diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-05-14 23:47:17 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-05-14 23:47:17 +0100 |
commit | d901cc916102f1aaccfb73396b48aa303e5b8cd7 (patch) | |
tree | 7c2fd470088874ab99b5922393327170e653cf01 /java/com | |
parent | 4aa4ecc380edc509aba886417c67d9c39ab51c9a (diff) | |
download | libguestfs-d901cc916102f1aaccfb73396b48aa303e5b8cd7.tar.gz libguestfs-d901cc916102f1aaccfb73396b48aa303e5b8cd7.tar.xz libguestfs-d901cc916102f1aaccfb73396b48aa303e5b8cd7.zip |
Add support for zerofree command.
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/redhat/et/libguestfs/GuestFS.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index c816baa0..76ada908 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -2729,4 +2729,30 @@ public class GuestFS { private native String _hexdump (long g, String path) throws LibGuestFSException; + /** + * zero unused inodes and disk blocks on ext2/3 filesystem + * + * This runs the *zerofree* program on "device". This + * program claims to zero unused inodes and disk blocks on + * an ext2/3 filesystem, thus making it possible to + * compress the filesystem more effectively. + * + * You should not run this program if the filesystem is + * mounted. + * + * It is possible that using this program can damage the + * filesystem or data on the filesystem. + * + * @throws LibGuestFSException + */ + public void zerofree (String device) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("zerofree: handle is closed"); + _zerofree (g, device); + } + private native void _zerofree (long g, String device) + throws LibGuestFSException; + } |