X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=96a58478d6c0041790103887ba1cde11748586cd;hp=d2da8ec937ce9400f10ed9c971424604bd50c694;hb=6b500f1b8e1ac8d28c485a5591c2833b18cc86e2;hpb=63e8da5abeaad1d2aa332fc41ad8f161fc567cdf diff --git a/src/generator.ml b/src/generator.ml index d2da8ec..96a5847 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -794,8 +794,9 @@ against a completely different C library. This call was added in version C<1.0.58>. In previous versions of libguestfs there was no way to get the version -number. From C code you can use ELF weak linking tricks to find out if -this symbol exists (if it doesn't, then it's an earlier version). +number. From C code you can use dynamic linker functions +to find out if this symbol exists (if it doesn't, then +it's an earlier version). The call returns a structure with four elements. The first three (C, C and C) are numbers and @@ -3474,7 +3475,7 @@ The C<-f> option removes the link (C) if it exists already."); "\ This command reads the target of a symbolic link."); - ("fallocate", (RErr, [Pathname "path"; Int "len"]), 169, [], + ("fallocate", (RErr, [Pathname "path"; Int "len"]), 169, [DeprecatedBy "fallocate64"], [InitBasicFS, Always, TestOutputStruct ( [["fallocate"; "/a"; "1000000"]; ["stat"; "/a"]], [CompareWithInt ("size", 1_000_000)])], @@ -3796,8 +3797,8 @@ was built (see C in the source)."); )], "echo arguments back to the client", "\ -This command concatenate the list of C passed with single spaces between -them and returns the resulting string. +This command concatenates the list of C passed with single spaces +between them and returns the resulting string. You can use this command to test the connection through to the daemon. @@ -4277,6 +4278,8 @@ the libguestfs appliance will be able to provide. The libguestfs groups, and the functions that those groups correspond to, are listed in L. +You can also fetch this list at runtime by calling +C. The argument C is a list of group names, eg: C<[\"inotify\", \"augeas\"]> would check for the availability of @@ -4707,6 +4710,40 @@ allows you to specify the new size (in bytes) explicitly."); This command is the same as C except that it allows you to specify the new size (in bytes) explicitly."); + ("available_all_groups", (RStringList "groups", []), 251, [], + [InitNone, Always, TestRun [["available_all_groups"]]], + "return a list of all optional groups", + "\ +This command returns a list of all optional groups that this +daemon knows about. Note this returns both supported and unsupported +groups. To find out which ones the daemon can actually support +you have to call C on each member of the +returned list. + +See also C and L."); + + ("fallocate64", (RErr, [Pathname "path"; Int64 "len"]), 252, [], + [InitBasicFS, Always, TestOutputStruct ( + [["fallocate64"; "/a"; "1000000"]; + ["stat"; "/a"]], [CompareWithInt ("size", 1_000_000)])], + "preallocate a file in the guest filesystem", + "\ +This command preallocates a file (containing zero bytes) named +C of size C bytes. If the file exists already, it +is overwritten. + +Note that this call allocates disk blocks for the file. +To create a sparse file use C instead. + +The deprecated call C does the same, +but owing to an oversight it only allowed 30 bit lengths +to be specified, effectively limiting the maximum size +of files created through that call to 1GB. + +Do not confuse this with the guestfish-specific +C and C commands which create +a file in the host and attach it as a device."); + ] let all_functions = non_daemon_functions @ daemon_functions @@ -9113,6 +9150,12 @@ and generate_python_c () = #define PY_SSIZE_T_CLEAN 1 #include +#if PY_VERSION_HEX < 0x02050000 +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif + #include #include #include