summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-21 16:18:16 +0100
committerRichard Jones <rjones@redhat.com>2009-05-21 16:18:16 +0100
commit3e408f493496597dc026d20778837f421f05a9dd (patch)
tree5aee1850ae052c36ab56de764d4130789280c7a8 /perl
parent0f81d0941a2705d49bc129f69924265fa60d9677 (diff)
downloadlibguestfs-3e408f493496597dc026d20778837f421f05a9dd.tar.gz
libguestfs-3e408f493496597dc026d20778837f421f05a9dd.tar.xz
libguestfs-3e408f493496597dc026d20778837f421f05a9dd.zip
Generated code for e2fsck-f command.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs11
-rw-r--r--perl/lib/Sys/Guestfs.pm15
2 files changed, 26 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 0cc124ce..66eeb294 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -1936,3 +1936,14 @@ PREINIT:
}
free (names);
+void
+e2fsck_f (g, device)
+ guestfs_h *g;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_e2fsck_f (g, device);
+ if (r == -1)
+ croak ("e2fsck_f: %s", guestfs_last_error (g));
+
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index e7f89248..cba00325 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -499,6 +499,15 @@ Setting C<whattodrop> to 3 should drop everything.
This automatically calls L<sync(2)> before the operation,
so that the maximum guest memory is freed.
+=item $h->e2fsck_f ($device);
+
+This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3
+filesystem checker on C<device>, noninteractively (C<-p>),
+even if the filesystem appears to be clean (C<-f>).
+
+This command is only needed because of C<$h-E<gt>resize2fs>
+(q.v.). Normally you should use C<$h-E<gt>fsck>.
+
=item $h->end_busy ();
This sets the state to C<READY>, or if in C<CONFIG> then it leaves the
@@ -910,6 +919,12 @@ function which has a more complex interface.
This resizes an ext2 or ext3 filesystem to match the size of
the underlying device.
+I<Note:> It is sometimes required that you run C<$h-E<gt>e2fsck_f>
+on the C<device> before calling this command. For unknown reasons
+C<resize2fs> sometimes gives an error about this and sometimes not.
+In any case, it is always safe to call C<$h-E<gt>e2fsck_f> before
+calling this function.
+
=item $h->rm ($path);
Remove the single file C<path>.