X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=java%2Fcom%2Fredhat%2Fet%2Flibguestfs%2FGuestFS.java;h=844c3b33e30bca5d643f86698171d46dabbaa7f1;hp=7e7cd686d7316d17e21fa88542bf80a8b6c26448;hb=0703248d233744047515418893dac05ce013a642;hpb=c69c3695303d5a660ad093a076c2e364ae6061de diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 7e7cd68..844c3b3 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -2356,4 +2356,30 @@ public class GuestFS { private native String _get_e2uuid (long g, String device) throws LibGuestFSException; + /** + * run the filesystem checker + * + * This runs the filesystem checker (fsck) on "device" + * which should have filesystem type "fstype". + * + * The returned integer is the status. See fsck(8) for the + * list of status codes from "fsck", and note that multiple + * status codes can be summed together. + * + * It is entirely equivalent to running "fsck -a -t fstype + * device". Note that checking or repairing NTFS volumes is + * not supported (by linux-ntfs). + * + * @throws LibGuestFSException + */ + public int fsck (String fstype, String device) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("fsck: handle is closed"); + return _fsck (g, fstype, device); + } + private native int _fsck (long g, String fstype, String device) + throws LibGuestFSException; + }