summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs11
-rw-r--r--perl/lib/Sys/Guestfs.pm8
2 files changed, 19 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 38c60c21..651e7a23 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -1588,3 +1588,14 @@ PREINIT:
OUTPUT:
RETVAL
+void
+zero (g, device)
+ guestfs_h *g;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_zero (g, device);
+ if (r == -1)
+ croak ("zero: %s", guestfs_last_error (g));
+
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index 5b87b27e..2d75b69f 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -1006,6 +1006,14 @@ Because of the message protocol, there is a transfer limit
of somewhere between 2MB and 4MB. To transfer large files you should use
FTP.
+=item $h->zero ($device);
+
+This command writes zeroes over the first few blocks of C<device>.
+
+How many blocks are zeroed isn't specified (but it's I<not> enough
+to securely wipe the device). It should be sufficient to remove
+any partition tables, filesystem superblocks and so on.
+
=cut
1;