mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Add progress messages to zero command.
This commit is contained in:
@@ -42,12 +42,14 @@ do_zero (const char *device)
|
||||
|
||||
memset (buf, 0, sizeof buf);
|
||||
|
||||
for (i = 0; i < 32; ++i)
|
||||
for (i = 0; i < 32; ++i) {
|
||||
if (write (fd, buf, sizeof buf) != sizeof buf) {
|
||||
reply_with_perror ("write: %s", device);
|
||||
close (fd);
|
||||
return -1;
|
||||
}
|
||||
notify_progress ((uint64_t) i, 32);
|
||||
}
|
||||
|
||||
if (close (fd) == -1) {
|
||||
reply_with_perror ("close: %s", device);
|
||||
|
||||
@@ -2698,7 +2698,7 @@ Checking or repairing NTFS volumes is not supported
|
||||
|
||||
This command is entirely equivalent to running C<fsck -a -t fstype device>.");
|
||||
|
||||
("zero", (RErr, [Device "device"]), 85, [],
|
||||
("zero", (RErr, [Device "device"]), 85, [Progress],
|
||||
[InitBasicFS, Always, TestOutput (
|
||||
[["umount"; "/dev/sda1"];
|
||||
["zero"; "/dev/sda1"];
|
||||
|
||||
Reference in New Issue
Block a user