[],
"get type of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the type of the inspected operating system.
Currently defined types are:
[],
"get architecture of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the architecture of the inspected operating system.
The possible return values are listed under
C<guestfs_file_architecture>.
[],
"get distro of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the distro (distribution) of the inspected operating
system.
[],
"get major version of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the major version number of the inspected operating
system.
[],
"get minor version of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the minor version number of the inspected operating
system.
[],
"get product name of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the product name of the inspected operating
system. The product name is generally some freeform string
which can be displayed to the user, but should not be
[],
"get mountpoints of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns a hash of where we think the filesystems
associated with this operating system should be mounted.
Callers should note that this is at best an educated guess
[],
"get filesystems associated with inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns a list of all the filesystems that we think
are associated with this operating system. This includes
the root filesystem, other ordinary filesystems, and
[],
"get Windows systemroot of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the Windows systemroot of the inspected guest.
The systemroot is a directory path such as C</WINDOWS>.
[],
"get package format used by the operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This function and C<guestfs_inspect_get_package_management> return
the package format and package management tool used by the
inspected operating system. For example for Fedora these
[],
"get package management tool used by the operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
C<guestfs_inspect_get_package_format> and this function return
the package format and package management tool used by the
inspected operating system. For example for Fedora these
[],
"get list of applications installed in the operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
Return the list of applications installed in the operating system.
I<Note:> This call works differently from other parts of the
[],
"get hostname of the operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This function returns the hostname of the operating system
as found by inspection of the guest's configuration files.
[],
"get format of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the format of the inspected operating system. You
can use it to detect install images, live CDs and similar.
[],
"get live flag for install disk",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
If C<guestfs_inspect_get_format> returns C<installer> (this
is an install disk), then this returns true if a live image
was detected on the disk.
[],
"get netinst (network installer) flag for install disk",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
If C<guestfs_inspect_get_format> returns C<installer> (this
is an install disk), then this returns true if the disk is
a network installer, ie. not a self-contained install CD but
[],
"get multipart flag for install disk",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
If C<guestfs_inspect_get_format> returns C<installer> (this
is an install disk), then this returns true if the disk is
part of a set.
[],
"get product variant of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the product variant of the inspected operating
system.
[],
"get Windows CurrentControlSet of inspected operating system",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This returns the Windows CurrentControlSet of the inspected guest.
The CurrentControlSet is a registry key name such as C<ControlSet001>.
[],
"get drive letter mappings",
"\
-This function should only be called with a root device string
-as returned by C<guestfs_inspect_os>.
-
This call is useful for Windows which uses a primitive system
of assigning drive letters (like \"C:\") to partitions.
This inspection API examines the Windows Registry to find out
particular that the filename is not prepended to the output
(the I<-b> option).
-This command can also be used on C</dev/> devices
-(and partitions, LV names). You can for example use this
-to determine if a device contains a filesystem, although
-it's usually better to use C<guestfs_vfs_type>.
+The output depends on the output of the underlying L<file(1)>
+command and it can change in future in ways beyond our control.
+In other words, the output is not guaranteed by the ABI.
-If the C<path> does not begin with C</dev/> then
-this command only works for the content of regular files.
-For other file types (directory, symbolic link etc) it
-will just return the string C<directory> etc.");
+See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>,
+C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>.");
("command", (RString "output", [StringList "arguments"], []), 50, [ProtocolLimitWarning],
[InitScratchFS, Always, TestOutput (
This command is entirely equivalent to running C<fsck -a -t fstype device>.");
("zero", (RErr, [Device "device"], []), 85, [Progress],
- [InitBasicFS, Always, TestOutput (
+ [InitBasicFS, Always, TestRun (
[["umount"; "/dev/sda1"];
- ["zero"; "/dev/sda1"];
- ["file"; "/dev/sda1"]], "data")],
+ ["zero"; "/dev/sda1"]])],
"write zeroes to the device",
"\
This command writes zeroes over the first few blocks of C<device>.
to securely wipe the device). It should be sufficient to remove
any partition tables, filesystem superblocks and so on.
-See also: C<guestfs_zero_device>, C<guestfs_scrub_device>.");
+See also: C<guestfs_zero_device>, C<guestfs_scrub_device>,
+C<guestfs_is_zero_device>");
("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [],
(* See:
control whether or not this operation is performed when the
handle is closed.");
+ ("is_zero", (RBool "zeroflag", [Pathname "path"], []), 283, [],
+ [InitISOFS, Always, TestOutputTrue (
+ [["is_zero"; "/100kallzeroes"]]);
+ InitISOFS, Always, TestOutputFalse (
+ [["is_zero"; "/100kallspaces"]])],
+ "test if a file contains all zero bytes",
+ "\
+This returns true iff the file exists and the file is empty or
+it contains all zero bytes.");
+
+ ("is_zero_device", (RBool "zeroflag", [Device "device"], []), 284, [],
+ [InitBasicFS, Always, TestOutputTrue (
+ [["umount"; "/dev/sda1"];
+ ["zero_device"; "/dev/sda1"];
+ ["is_zero_device"; "/dev/sda1"]]);
+ InitBasicFS, Always, TestOutputFalse (
+ [["is_zero_device"; "/dev/sda1"]])],
+ "test if a device contains all zero bytes",
+ "\
+This returns true iff the device exists and contains all zero bytes.
+
+Note that for large devices this can take a long time to run.");
+
+ ("list_9p", (RStringList "mounttags", [], []), 285, [],
+ [],
+ "list 9p filesystems",
+ "\
+List all 9p filesystems attached to the guest. A list of
+mount tags is returned.");
+
+ ("mount_9p", (RErr, [String "mounttag"; String "mountpoint"], [String "options"]), 286, [],
+ [],
+ "mount 9p filesystem",
+ "\
+Mount the virtio-9p filesystem with the tag C<mounttag> on the
+directory C<mountpoint>.
+
+If required, C<trans=virtio> will be automatically added to the options.
+Any other options required can be passed in the optional C<options>
+parameter.");
+
]
let all_functions = non_daemon_functions @ daemon_functions