X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2Fgenerator_actions.ml;h=e7dd42b6e0cd9bb17cab942b65e318179ba5da59;hp=8add55fe7082320dbdefe1ebaac261032902dd6c;hb=c5a6584c4fcc0051e1a333838d7562a4fba7ad1f;hpb=f48cd1f262312ad278a293a20ab442dcfc076a69 diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 8add55f..e7dd42b 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -779,6 +779,10 @@ Currently defined distros are: =over 4 +=item \"archlinux\" + +Arch Linux. + =item \"debian\" Debian or a Debian-derived distro such as Ubuntu. @@ -787,6 +791,18 @@ Debian or a Debian-derived distro such as Ubuntu. Fedora. +=item \"gentoo\" + +Gentoo. + +=item \"meego\" + +MeeGo. + +=item \"pardus\" + +Pardus. + =item \"redhat-based\" Some Red Hat-derived distro. @@ -800,6 +816,10 @@ Red Hat Enterprise Linux and some derivatives. Windows does not have distributions. This string is returned if the OS type is Windows. +=item \"ubuntu\" + +Ubuntu. + =item \"unknown\" The distro could not be determined. @@ -1002,6 +1022,22 @@ deprecated C 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. + +This returns the Windows systemroot of the inspected guest. +The systemroot is a directory path such as C. + +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 for more details."); + ] (* daemon_functions are any functions which cause some action @@ -1119,7 +1155,10 @@ See also C."); [InitBasicFS, Always, TestOutputListOfDevices ( [["list_partitions"]], ["/dev/sda1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["list_partitions"]], ["/dev/sda1"; "/dev/sda2"; "/dev/sda3"])], "list the partitions", "\ @@ -1136,7 +1175,10 @@ See also C."); [InitBasicFSonLVM, Always, TestOutputListOfDevices ( [["pvs"]], ["/dev/sda1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1155,7 +1197,10 @@ See also C."); [InitBasicFSonLVM, Always, TestOutputList ( [["vgs"]], ["VG"]); InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1176,7 +1221,10 @@ See also C."); [InitBasicFSonLVM, Always, TestOutputList ( [["lvs"]], ["/dev/VG/LV"]); InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1532,7 +1580,10 @@ See also C."); ("pvcreate", (RErr, [Device "device"], []), 39, [Optional "lvm2"], [InitEmpty, Always, TestOutputListOfDevices ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1545,7 +1596,10 @@ as C."); ("vgcreate", (RErr, [String "volgroup"; DeviceList "physvols"], []), 40, [Optional "lvm2"], [InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1559,7 +1613,10 @@ from the non-empty list of physical volumes C."); ("lvcreate", (RErr, [String "logvol"; String "volgroup"; Int "mbytes"], []), 41, [Optional "lvm2"], [InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1673,7 +1730,10 @@ See also: C"); ["mounts"]], []); (* check that umount_all can unmount nested mounts correctly: *) InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["mkfs"; "ext2"; "/dev/sda1"]; ["mkfs"; "ext2"; "/dev/sda2"]; ["mkfs"; "ext2"; "/dev/sda3"]; @@ -3394,13 +3454,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 is not compatible with C. +You may get unexpected errors if you try to mix these calls. It is +safest to manually unmount filesystems and remove mountpoints after use. -The inner filesystem is now unpacked under the /ext3 mountpoint."); +C 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 + +Autosync [see C, this is set by default on +handles] means that C is called when the handle +is closed which can also trigger these issues."); ("rmmountpoint", (RErr, [String "exemptpath"], []), 149, [], [], @@ -3845,7 +3920,9 @@ the requested cluster size."); ("mke2journal", (RErr, [Int "blocksize"; Device "device"], []), 188, [], [InitEmpty, Always, TestOutput ( - [["sfdiskM"; "/dev/sda"; ",100 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "-64"]; ["mke2journal"; "4096"; "/dev/sda1"]; ["mke2fs_J"; "ext2"; "4096"; "/dev/sda2"; "/dev/sda1"]; ["mount_options"; ""; "/dev/sda2"; "/"]; @@ -3860,7 +3937,9 @@ to the command: ("mke2journal_L", (RErr, [Int "blocksize"; String "label"; Device "device"], []), 189, [], [InitEmpty, Always, TestOutput ( - [["sfdiskM"; "/dev/sda"; ",100 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "-64"]; ["mke2journal_L"; "4096"; "JOURNAL"; "/dev/sda1"]; ["mke2fs_JL"; "ext2"; "4096"; "/dev/sda2"; "JOURNAL"]; ["mount_options"; ""; "/dev/sda2"; "/"]; @@ -3873,7 +3952,9 @@ This creates an ext2 external journal on C with label C