Lines Matching +defs:count +defs:lines

872  * Read lines from an open file descriptor and store them in an array of
873 * strings until EOF. lines[] will be allocated and populated with all the
874 * lines read. All newlines are replaced with NULL terminators for
875 * convenience. lines[] must be freed after use with libzfs_free_str_array().
877 * Returns the number of lines read.
880 libzfs_read_stdout_from_fd(int fd, char **lines[])
897 /* Return the lines we were able to process */
913 *lines = tmp_lines;
919 char **lines[], int *lines_cnt)
929 if (lines != NULL && pipe2(link, O_NONBLOCK | O_CLOEXEC) == -1)
941 if (!(flags & STDOUT_VERBOSE) && (lines == NULL))
943 else if (lines != NULL) {
944 /* Save the output to lines[] */
974 if (lines != NULL) {
976 *lines_cnt = libzfs_read_stdout_from_fd(link[0], lines);
991 * Run a command and store its stdout lines in an array of strings (lines[]).
992 * lines[] is allocated and populated for you, and the number of lines is set in
993 * lines_cnt. lines[] must be freed after use with libzfs_free_str_array().
994 * All newlines (\n) in lines[] are terminated for convenience.
998 char **lines[], int *lines_cnt)
1000 return (libzfs_run_process_impl(path, argv, env, 0, lines, lines_cnt));
1009 char *env[], char **lines[], int *lines_cnt)
1012 lines, lines_cnt));
1020 libzfs_free_str_array(char **strs, int count)
1022 while (--count >= 0)
1023 free(strs[count]);
2367 const char *prepare_str, char **lines[], int *lines_cnt)
2401 rc = libzfs_run_process_get_stdout(script_path, argv, env, lines,
2436 char **lines[], int *lines_cnt)
2444 rc = zpool_prepare_disk(zhp, vdev_nv, prepare_str, lines, lines_cnt);