inspect: Refuse to download software hive if it is huge.
[libguestfs.git] / daemon / df.c
index 563760d..a1ec706 100644 (file)
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "../src/guestfs_protocol.h"
+#include "guestfs_protocol.h"
 #include "daemon.h"
 #include "actions.h"
 
@@ -33,11 +33,11 @@ do_df (void)
   int r;
   char *out, *err;
 
-  NEED_ROOT (return NULL);
+  NEED_ROOT (0, return NULL);
 
   r = command (&out, &err, "df", NULL);
   if (r == -1) {
-    reply_with_error ("df: %s", err);
+    reply_with_error ("%s", err);
     free (out);
     free (err);
     return NULL;
@@ -54,11 +54,11 @@ do_df_h (void)
   int r;
   char *out, *err;
 
-  NEED_ROOT (return NULL);
+  NEED_ROOT (0, return NULL);
 
   r = command (&out, &err, "df", "-h", NULL);
   if (r == -1) {
-    reply_with_error ("df -h: %s", err);
+    reply_with_error ("%s", err);
     free (out);
     free (err);
     return NULL;