daemon: Add perror to two exit paths to make errors clearer.
[libguestfs.git] / daemon / guestfsd.c
index e398b7d..8d950fa 100644 (file)
@@ -258,6 +258,7 @@ main (int argc, char *argv[])
              "output to the libguestfs developers, either in a bug report\n"
              "or on the libguestfs redhat com mailing list.\n"
              "\n");
              "output to the libguestfs developers, either in a bug report\n"
              "or on the libguestfs redhat com mailing list.\n"
              "\n");
+    perror ("/dev/virtio-ports/org.libguestfs.channel.0");
     exit (EXIT_FAILURE);
   }
 
     exit (EXIT_FAILURE);
   }
 
@@ -270,8 +271,10 @@ main (int argc, char *argv[])
   xdrmem_create (&xdr, lenbuf, sizeof lenbuf, XDR_ENCODE);
   xdr_u_int (&xdr, &len);
 
   xdrmem_create (&xdr, lenbuf, sizeof lenbuf, XDR_ENCODE);
   xdr_u_int (&xdr, &len);
 
-  if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
+  if (xwrite (sock, lenbuf, sizeof lenbuf) == -1) {
+    perror ("xwrite");
     exit (EXIT_FAILURE);
     exit (EXIT_FAILURE);
+  }
 
   xdr_destroy (&xdr);
 
 
   xdr_destroy (&xdr);
 
@@ -974,7 +977,8 @@ trim (char *str)
 }
 
 /* printf helper function so we can use %Q ("quoted") and %R to print
 }
 
 /* printf helper function so we can use %Q ("quoted") and %R to print
- * shell-quoted strings.  See HACKING file for more details.
+ * shell-quoted strings.  See guestfs(3)/EXTENDING LIBGUESTFS for more
+ * details.
  */
 static int
 print_shell_quote (FILE *stream,
  */
 static int
 print_shell_quote (FILE *stream,