Add generated code for 'fsck' command.
[libguestfs.git] / python / guestfs.py
index ab0154f..37dce2b 100644 (file)
@@ -194,9 +194,12 @@ class GuestFS:
 
     def set_autosync (self, autosync):
         u"""If "autosync" is true, this enables autosync. Libguestfs
-        will make a best effort attempt to run "g.sync" when the
-        handle is closed (also if the program exits without
-        closing handles).
+        will make a best effort attempt to run "g.umount_all"
+        followed by "g.sync" when the handle is closed (also if
+        the program exits without closing handles).
+        
+        This is disabled by default (except in guestfish where
+        it is enabled by default).
         """
         return libguestfsmod.set_autosync (self._o, autosync)
 
@@ -1146,3 +1149,17 @@ 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", 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).
+        """
+        return libguestfsmod.fsck (self._o, fstype, device)
+