inspect: Generic parsing of MAJOR.MINOR in product names.
[libguestfs.git] / generator / generator_actions.ml
index 695a73d..086584c 100644 (file)
@@ -286,11 +286,11 @@ best effort attempt to run C<guestfs_umount_all> followed by
 C<guestfs_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).");
+This is enabled by default (since libguestfs 1.5.24, previously it was
+disabled by default).");
 
   ("get_autosync", (RBool "autosync", [], []), -1, [],
-   [InitNone, Always, TestRun (
+   [InitNone, Always, TestOutputTrue (
       [["get_autosync"]])],
    "get autosync mode",
    "\
@@ -1002,6 +1002,22 @@ deprecated C<guestfs_add_drive_with_if> call (q.v.)
 
 =back");
 
+  ("inspect_get_windows_systemroot", (RString "systemroot", [Device "root"], []), -1, [],
+   [],
+   "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>.
+
+This call assumes that the guest is Windows and that the
+systemroot could be determined by inspection.  If this is not
+the case then an error is returned.
+
+Please read L<guestfs(3)/INSPECTION> for more details.");
+
 ]
 
 (* daemon_functions are any functions which cause some action
@@ -3394,13 +3410,28 @@ in guestfish:
  add-ro Fedora-11-i686-Live.iso
  run
  mkmountpoint /cd
- mkmountpoint /squash
- mkmountpoint /ext3
+ mkmountpoint /sqsh
+ mkmountpoint /ext3fs
  mount /dev/sda /cd
- mount-loop /cd/LiveOS/squashfs.img /squash
- mount-loop /squash/LiveOS/ext3fs.img /ext3
+ mount-loop /cd/LiveOS/squashfs.img /sqsh
+ mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs
+
+The inner filesystem is now unpacked under the /ext3fs mountpoint.
+
+C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>.
+You may get unexpected errors if you try to mix these calls.  It is
+safest to manually unmount filesystems and remove mountpoints after use.
+
+C<guestfs_umount_all> unmounts filesystems by sorting the paths
+longest first, so for this to work for manual mountpoints, you
+must ensure that the innermost mountpoints have the longest
+pathnames, as in the example code above.
+
+For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>
 
-The inner filesystem is now unpacked under the /ext3 mountpoint.");
+Autosync [see C<guestfs_set_autosync>, this is set by default on
+handles] means that C<guestfs_umount_all> is called when the handle
+is closed which can also trigger these issues.");
 
   ("rmmountpoint", (RErr, [String "exemptpath"], []), 149, [],
    [],
@@ -5208,6 +5239,22 @@ see the L<pread(2)> system call.
 
 See also C<guestfs_pread>.");
 
+  ("lvm_canonical_lv_name", (RString "lv", [Device "lvname"], []), 277, [],
+   [InitBasicFSonLVM, IfAvailable "lvm2", TestOutput (
+    [["lvm_canonical_lv_name"; "/dev/mapper/VG-LV"]], "/dev/VG/LV");
+    InitBasicFSonLVM, IfAvailable "lvm2", TestOutput (
+    [["lvm_canonical_lv_name"; "/dev/VG/LV"]], "/dev/VG/LV")],
+   "get canonical name of an LV",
+   "\
+This converts alternative naming schemes for LVs that you
+might find to the canonical name.  For example, C</dev/mapper/VG-LV>
+is converted to C</dev/VG/LV>.
+
+This command returns an error if the C<lvname> parameter does
+not refer to a logical volume.
+
+See also C<guestfs_is_lv>.");
+
 ]
 
 let all_functions = non_daemon_functions @ daemon_functions