X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fguestfsd.c;h=f9e5a682b2066401ec6167605c159b9df7d2ff2a;hp=ef28d9b698f39d2af008fbd4bc9b6d6acfa716fe;hb=aee7d55fcf754d97d945c318ec06d6387ade067b;hpb=63882fb2201c834db57c9b9287ff9349310f7dde diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index ef28d9b..f9e5a68 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef HAVE_PRINTF_H # include @@ -543,10 +544,10 @@ add_string (char ***argv, int *size, int *alloc, const char *str) return 0; } -int +size_t count_strings (char *const *argv) { - int argc; + size_t argc; for (argc = 0; argv[argc] != NULL; ++argc) ; @@ -758,20 +759,20 @@ commandrvf (char **stdoutput, char **stderror, int flags, */ if (pipe (so_fd) == -1 || pipe (se_fd) == -1) { - perror ("pipe"); + error (0, errno, "pipe"); abort (); } if (flag_copy_stdin) { if (pipe (stdin_fd) == -1) { - perror ("pipe"); + error (0, errno, "pipe"); abort (); } } pid = fork (); if (pid == -1) { - perror ("fork"); + error (0, errno, "fork"); abort (); } @@ -805,7 +806,7 @@ commandrvf (char **stdoutput, char **stderror, int flags, stdin_pid = fork (); if (stdin_pid == -1) { - perror ("fork"); + error (0, errno, "fork"); abort (); }