summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-28 14:28:42 +0100
committerRichard Jones <rjones@redhat.com>2010-09-01 10:00:34 +0100
commit55938405ccd3d5e5736f30c9bd78a51998cd7158 (patch)
tree70ad48296a48cbbf24dacd112b6fc4370598212a
parent7f1ecfc87eb45cab401394b980e15f8981511627 (diff)
downloadlibguestfs-55938405ccd3d5e5736f30c9bd78a51998cd7158.tar.gz
libguestfs-55938405ccd3d5e5736f30c9bd78a51998cd7158.tar.xz
libguestfs-55938405ccd3d5e5736f30c9bd78a51998cd7158.zip
Add progress messages to fill-pattern command.
-rw-r--r--daemon/fill.c1
-rwxr-xr-xsrc/generator.ml2
2 files changed, 2 insertions, 1 deletions
diff --git a/daemon/fill.c b/daemon/fill.c
index a3e3d374..8686226f 100644
--- a/daemon/fill.c
+++ b/daemon/fill.c
@@ -113,6 +113,7 @@ do_fill_pattern (const char *pattern, int len, const char *path)
return -1;
}
n += wrlen;
+ notify_progress ((uint64_t) n, (uint64_t) len_sz);
}
if (close (fd) == -1) {
diff --git a/src/generator.ml b/src/generator.ml
index b5c88e92..c9a99e1b 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -5068,7 +5068,7 @@ filename is not printable, coreutils uses a special
backslash syntax. For more information, see the GNU
coreutils info file.");
- ("fill_pattern", (RErr, [String "pattern"; Int "len"; Pathname "path"]), 245, [],
+ ("fill_pattern", (RErr, [String "pattern"; Int "len"; Pathname "path"]), 245, [Progress],
[InitBasicFS, Always, TestOutputBuffer (
[["fill_pattern"; "abcdefghijklmnopqrstuvwxyz"; "28"; "/test"];
["read_file"; "/test"]], "abcdefghijklmnopqrstuvwxyzab")],