* src/generator.ml: Change all `String "device"' to `Device "device"'.
[libguestfs.git] / daemon / scrub.c
index 3c22b66..2beaea3 100644 (file)
@@ -33,8 +33,6 @@ do_scrub_device (char *device)
   char *err;
   int r;
 
-  RESOLVE_DEVICE (device, return -1);
-
   r = command (NULL, &err, "scrub", device, NULL);
   if (r == -1) {
     reply_with_error ("scrub_device: %s: %s", device, err);
@@ -55,7 +53,7 @@ do_scrub_file (char *file)
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (file, -1);
+  ABS_PATH (file, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (file);
@@ -85,7 +83,7 @@ do_scrub_freespace (char *dir)
   int r;
 
   NEED_ROOT (-1);
-  ABS_PATH (dir, -1);
+  ABS_PATH (dir, return -1);
 
   /* Make the path relative to /sysroot. */
   buf = sysroot_path (dir);