Add progress messages to fill command.
authorRichard Jones <rjones@redhat.com>
Sat, 28 Aug 2010 13:28:26 +0000 (14:28 +0100)
committerRichard Jones <rjones@redhat.com>
Wed, 1 Sep 2010 09:00:30 +0000 (10:00 +0100)
daemon/fill.c
src/generator.ml

index 807ee39..a3e3d37 100644 (file)
@@ -66,6 +66,7 @@ do_fill (int c, int len, const char *path)
       return -1;
     }
     n += r;
       return -1;
     }
     n += r;
+    notify_progress ((uint64_t) n, (uint64_t) len_sz);
   }
 
   if (close (fd) == -1) {
   }
 
   if (close (fd) == -1) {
index ec93850..b5c88e9 100755 (executable)
@@ -4693,7 +4693,7 @@ partition table), C<gpt> (a GPT/EFI-style partition table).  Other
 values are possible, although unusual.  See C<guestfs_part_init>
 for a full list.");
 
 values are possible, although unusual.  See C<guestfs_part_init>
 for a full list.");
 
-  ("fill", (RErr, [Int "c"; Int "len"; Pathname "path"]), 215, [],
+  ("fill", (RErr, [Int "c"; Int "len"; Pathname "path"]), 215, [Progress],
    [InitBasicFS, Always, TestOutputBuffer (
       [["fill"; "0x63"; "10"; "/test"];
        ["read_file"; "/test"]], "cccccccccc")],
    [InitBasicFS, Always, TestOutputBuffer (
       [["fill"; "0x63"; "10"; "/test"];
        ["read_file"; "/test"]], "cccccccccc")],