X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2Fgenerator_actions.ml;h=58c5f84cd9a9ab4a29b3b742e2f30b43ce327607;hp=ca2dfe307cc84ff86bd36f5754c95d48b46ad687;hb=2b0ca7e7b8d369a42a51b1feec72ae8f17257c78;hpb=2020eded8a3f381c722abe001be8000723ff2418 diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index ca2dfe3..58c5f84 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -1,5 +1,5 @@ (* libguestfs - * Copyright (C) 2009-2010 Red Hat Inc. + * Copyright (C) 2009-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -103,7 +103,7 @@ You probably don't want to call this function.")] *) let non_daemon_functions = test_functions @ [ - ("launch", (RErr, [], []), -1, [FishAlias "run"], + ("launch", (RErr, [], []), -1, [FishAlias "run"; Progress], [], "launch the qemu subprocess", "\ @@ -300,10 +300,14 @@ Get the autosync flag."); [], "set verbose mode", "\ -If C is true, this turns on verbose messages (to C). +If C is true, this turns on verbose messages. Verbose messages are disabled unless the environment variable -C is defined and set to C<1>."); +C is defined and set to C<1>. + +Verbose messages are normally sent to C, unless you +register a callback to send them somewhere else (see +C)."); ("get_verbose", (RBool "verbose", [], []), -1, [], [], @@ -469,19 +473,19 @@ see L."); ["get_trace"]])], "enable or disable command traces", "\ -If the command trace flag is set to 1, then commands are -printed on stderr before they are executed in a format -which is very similar to the one used by guestfish. In -other words, you can run a program with this enabled, and -you will get out a script which you can feed to guestfish -to perform the same set of actions. +If the command trace flag is set to 1, then libguestfs +calls, parameters and return values are traced. If you want to trace C API calls into libguestfs (and other libraries) then possibly a better way is to use the external ltrace(1) command. Command traces are disabled unless the environment variable -C is defined and set to C<1>."); +C is defined and set to C<1>. + +Trace messages are normally sent to C, unless you +register a callback to send them somewhere else (see +C)."); ("get_trace", (RBool "trace", [], []), -1, [], [], @@ -787,6 +791,10 @@ Currently defined distros are: Arch Linux. +=item \"centos\" + +CentOS. + =item \"debian\" Debian. @@ -821,7 +829,15 @@ Some Red Hat-derived distro. =item \"rhel\" -Red Hat Enterprise Linux and some derivatives. +Red Hat Enterprise Linux. + +=item \"scientificlinux\" + +Scientific Linux. + +=item \"slackware\" + +Slackware. =item \"ubuntu\" @@ -920,6 +936,12 @@ which is the filesystem that would be mounted there Non-mounted devices such as swap devices are I returned in this list. +For operating systems like Windows which still use drive +letters, this call will only return an entry for the first +drive \"mounted on\" C. For information about the +mapping of drive letters to partitions, see +C. + Please read L for more details. See also C."); @@ -1413,6 +1435,88 @@ L. "\ Return the current attach method. See C."); + ("inspect_get_product_variant", (RString "variant", [Device "root"], []), -1, [], + [], + "get product variant of inspected operating system", + "\ +This function should only be called with a root device string +as returned by C. + +This returns the product variant of the inspected operating +system. + +For Windows guests, this returns the contents of the Registry key +C +C which is usually a string such as +C or C (other values are possible). This +can be used to distinguish consumer and enterprise versions +of Windows that have the same version number (for example, +Windows 7 and Windows 2008 Server are both version 6.1, +but the former is C and the latter is C). + +For enterprise Linux guests, in future we intend this to return +the product variant such as C, C and so on. But +this is not implemented at present. + +If the product variant could not be determined, then the +string C is returned. + +Please read L for more details. +See also C, +C."); + + ("inspect_get_windows_current_control_set", (RString "controlset", [Device "root"], []), -1, [], + [], + "get Windows CurrentControlSet of inspected operating system", + "\ +This function should only be called with a root device string +as returned by C. + +This returns the Windows CurrentControlSet of the inspected guest. +The CurrentControlSet is a registry key name such as C. + +This call assumes that the guest is Windows and that the +Registry could be examined by inspection. If this is not +the case then an error is returned. + +Please read L for more details."); + + ("inspect_get_drive_mappings", (RHashtable "drives", [Device "root"], []), -1, [], + [], + "get drive letter mappings", + "\ +This function should only be called with a root device string +as returned by C. + +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 +how disks/partitions are mapped to drive letters, and returns +a hash table as in the example below: + + C => /dev/vda2 + E => /dev/vdb1 + F => /dev/vdc1 + +Note that keys are drive letters. For Windows, the key is +case insensitive and just contains the drive letter, without +the customary colon separator character. + +In future we may support other operating systems that also used drive +letters, but the keys for those might not be case insensitive +and might be longer than 1 character. For example in OS-9, +hard drives were named C, C

etc. + +For Windows guests, currently only hard drive mappings are +returned. Removable disks (eg. DVD-ROMs) are ignored. + +For guests that do not use drive mappings, or if the drive mappings +could not be determined, this returns an empty hash table. + +Please read L for more details. +See also C, +C."); + ] (* daemon_functions are any functions which cause some action @@ -3539,7 +3643,7 @@ This command is mostly useful for interactive sessions. It is I intended that you try to parse the output string. Use C from programs."); - ("du", (RInt64 "sizekb", [Pathname "path"], []), 127, [], + ("du", (RInt64 "sizekb", [Pathname "path"], []), 127, [Progress], [InitISOFS, Always, TestOutputInt ( [["du"; "/directory"]], 2 (* ISO fs blocksize is 2K *))], "estimate file space usage",