X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=python%2Fguestfs.py;h=022150bddcabaa8fb2af8c2cf4953df60a2b4a35;hp=2fced28e0f93e8e7bade17811d3118039551e56a;hb=36f9dac1a2530b575dab9226f6ddd85e6e8c8590;hpb=f7e6ffa8a82f8a7a214a47ff32f46d9e893902d8 diff --git a/python/guestfs.py b/python/guestfs.py index 2fced28..022150b 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1149,3 +1149,37 @@ class GuestFS: """ return libguestfsmod.get_e2uuid (self._o, device) + def fsck (self, fstype, device): + u"""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". + + Notes: + + * Multiple status codes can be summed together. + + * A non-zero return code can mean "success", for + example if errors have been corrected on the + filesystem. + + * Checking or repairing NTFS volumes is not supported + (by linux-ntfs). + + This command is entirely equivalent to running "fsck -a + -t fstype device". + """ + return libguestfsmod.fsck (self._o, fstype, device) + + def zero (self, device): + u"""This command writes zeroes over the first few blocks of + "device". + + How many blocks are zeroed isn't specified (but it's + *not* enough to securely wipe the device). It should be + sufficient to remove any partition tables, filesystem + superblocks and so on. + """ + return libguestfsmod.zero (self._o, device) +