daemon error handling: Define a new function reply_with_perror_errno.
[libguestfs.git] / daemon / proto.c
index e3ff9e9..1ad9d11 100644 (file)
@@ -195,12 +195,11 @@ reply_with_error (const char *fs, ...)
 }
 
 void
-reply_with_perror (const char *fs, ...)
+reply_with_perror_errno (int err, const char *fs, ...)
 {
   char buf1[GUESTFS_ERROR_LEN];
   char buf2[GUESTFS_ERROR_LEN];
   va_list args;
-  int err = errno;
 
   va_start (args, fs);
   vsnprintf (buf1, sizeof buf1, fs, args);