+ def tune2fs_l (self, device):
+ u"""This returns the contents of the ext2 or ext3 filesystem
+ superblock on "device".
+
+ It is the same as running "tune2fs -l device". See
+ tune2fs(8) manpage for more details. The list of fields
+ returned isn't clearly defined, and depends on both the
+ version of "tune2fs" that libguestfs was built against,
+ and the filesystem itself.
+
+ This function returns a dictionary.
+ """
+ return libguestfsmod.tune2fs_l (self._o, device)
+
+ def blockdev_setro (self, device):
+ u"""Sets the block device named "device" to read-only.
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_setro (self._o, device)
+
+ def blockdev_setrw (self, device):
+ u"""Sets the block device named "device" to read-write.
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_setrw (self._o, device)
+
+ def blockdev_getro (self, device):
+ u"""Returns a boolean indicating if the block device is
+ read-only (true if read-only, false if not).
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_getro (self._o, device)
+
+ def blockdev_getss (self, device):
+ u"""This returns the size of sectors on a block device.
+ Usually 512, but can be larger for modern devices.
+
+ (Note, this is not the size in sectors, use
+ "g.blockdev_getsz" for that).
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_getss (self._o, device)
+
+ def blockdev_getbsz (self, device):
+ u"""This returns the block size of a device.
+
+ (Note this is different from both *size in blocks* and
+ *filesystem block size*).
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_getbsz (self._o, device)
+
+ def blockdev_setbsz (self, device, blocksize):
+ u"""This sets the block size of a device.
+
+ (Note this is different from both *size in blocks* and
+ *filesystem block size*).
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_setbsz (self._o, device, blocksize)
+
+ def blockdev_getsz (self, device):
+ u"""This returns the size of the device in units of 512-byte
+ sectors (even if the sectorsize isn't 512 bytes ...
+ weird).
+
+ See also "g.blockdev_getss" for the real sector size of
+ the device, and "g.blockdev_getsize64" for the more
+ useful *size in bytes*.
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_getsz (self._o, device)
+
+ def blockdev_getsize64 (self, device):
+ u"""This returns the size of the device in bytes.
+
+ See also "g.blockdev_getsz".
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_getsize64 (self._o, device)
+
+ def blockdev_flushbufs (self, device):
+ u"""This tells the kernel to flush internal buffers
+ associated with "device".
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_flushbufs (self._o, device)
+
+ def blockdev_rereadpt (self, device):
+ u"""Reread the partition table on "device".
+
+ This uses the blockdev(8) command.
+ """
+ return libguestfsmod.blockdev_rereadpt (self._o, device)
+
+ def upload (self, filename, remotefilename):
+ u"""Upload local file "filename" to "remotefilename" on the
+ filesystem.
+
+ "filename" can also be a named pipe.
+
+ See also "g.download".
+ """
+ return libguestfsmod.upload (self._o, filename, remotefilename)
+
+ def download (self, remotefilename, filename):
+ u"""Download file "remotefilename" and save it as "filename"
+ on the local machine.
+
+ "filename" can also be a named pipe.
+
+ See also "g.upload", "g.cat".
+ """
+ return libguestfsmod.download (self._o, remotefilename, filename)
+