Lines Matching refs:lines
831 * Read lines from an open file descriptor and store them in an array of
832 * strings until EOF. lines[] will be allocated and populated with all the
833 * lines read. All newlines are replaced with NULL terminators for
834 * convenience. lines[] must be freed after use with libzfs_free_str_array().
836 * Returns the number of lines read.
839 libzfs_read_stdout_from_fd(int fd, char **lines[])
860 /* Return the lines we were able to process */
873 *lines = tmp_lines;
879 char **lines[], int *lines_cnt)
889 if ((lines != NULL) && pipe2(link, O_CLOEXEC) == -1)
900 if (!(flags & STDOUT_VERBOSE) && (lines == NULL))
902 else if (lines != NULL) {
903 /* Save the output to lines[] */
932 if (lines != NULL) {
934 *lines_cnt = libzfs_read_stdout_from_fd(link[0], lines);
949 * Run a command and store its stdout lines in an array of strings (lines[]).
950 * lines[] is allocated and populated for you, and the number of lines is set in
951 * lines_cnt. lines[] must be freed after use with libzfs_free_str_array().
952 * All newlines (\n) in lines[] are terminated for convenience.
956 char **lines[], int *lines_cnt)
958 return (libzfs_run_process_impl(path, argv, env, 0, lines, lines_cnt));
967 char *env[], char **lines[], int *lines_cnt)
970 lines, lines_cnt));