X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=generator%2Fgenerator_actions.ml;h=2f9fb71d743f7b8d8b909c2cef67a0931436cc4b;hb=b62e154d97f727f322f954060c67b6ba14cb1925;hp=0d08f730f97ca3c3b6dc71aed9563b5df5b958ca;hpb=61a0f7988447fe0911360f8dfc2962086967cc9a;p=libguestfs.git diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 0d08f73..2f9fb71 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -2359,7 +2359,7 @@ Reread the partition table on C. This uses the L command."); - ("upload", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"], []), 66, [], + ("upload", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"], []), 66, [Progress], [InitScratchFS, Always, TestOutput ( (* Pick a file from cwd which isn't likely to change. *) [["mkdir"; "/upload"]; @@ -3402,7 +3402,7 @@ This command runs the C command to report disk space used. This command is mostly useful for interactive sessions. It is I intended that you try to parse the output string. -Use C from programs."); +Use C from programs."); ("df_h", (RString "output", [], []), 126, [], [], (* XXX Tricky to test because it depends on the exact format @@ -3415,7 +3415,7 @@ in human-readable format. This command is mostly useful for interactive sessions. It is I intended that you try to parse the output string. -Use C from programs."); +Use C from programs."); ("du", (RInt64 "sizekb", [Pathname "path"], []), 127, [], [InitISOFS, Always, TestOutputInt ( @@ -4186,7 +4186,7 @@ This gets the SELinux security context of the daemon. See the documentation about SELINUX in L, and C"); - ("mkfs_b", (RErr, [String "fstype"; Int "blocksize"; Device "device"], []), 187, [], + ("mkfs_b", (RErr, [String "fstype"; Int "blocksize"; Device "device"], []), 187, [DeprecatedBy "mkfs_opts"], [InitEmpty, Always, TestOutput ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs_b"; "ext2"; "4096"; "/dev/sda1"]; @@ -5510,7 +5510,7 @@ removes the partition number, returning the device name The named partition must exist, for example as a string returned from C."); - ("upload_offset", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"; Int64 "offset"], []), 273, [], + ("upload_offset", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"; Int64 "offset"], []), 273, [Progress], (let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in [InitScratchFS, Always, TestOutput ( [["upload_offset"; "../COPYING.LIB"; "/upload_offset"; "0"]; @@ -5606,6 +5606,73 @@ not refer to a logical volume. See also C."); + ("mkfs_opts", (RErr, [String "fstype"; Device "device"], [Int "blocksize"]), 278, [], + [InitEmpty, Always, TestOutput ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["mkfs_opts"; "ext2"; "/dev/sda1"; "4096"]; + ["mount_options"; ""; "/dev/sda1"; "/"]; + ["write"; "/new"; "new file contents"]; + ["cat"; "/new"]], "new file contents")], + "make a filesystem", + "\ +This function creates a filesystem on C. The filesystem +type is C, for example C. + +The optional arguments are: + +=over 4 + +=item C + +The filesystem block size. Supported block sizes depend on the +filesystem type, but typically they are C<1024>, C<2048> or C<4096> +for Linux ext2/3 filesystems. + +For VFAT and NTFS the C parameter is treated as +the requested cluster size. + +=back"); + + ("getxattr", (RBufferOut "xattr", [Pathname "path"; String "name"], []), 279, [Optional "linuxxattrs"], + [], + "get a single extended attribute", + "\ +Get a single extended attribute from file C named C. +This call follows symlinks. If you want to lookup an extended +attribute for the symlink itself, use C. + +Normally it is better to get all extended attributes from a file +in one go by calling C. However some Linux +filesystem implementations are buggy and do not provide a way to +list out attributes. For these filesystems (notably ntfs-3g) +you have to know the names of the extended attributes you want +in advance and call this function. + +Extended attribute values are blobs of binary data. If there +is no extended attribute named C, this returns an error. + +See also: C, C, L."); + + ("lgetxattr", (RBufferOut "xattr", [Pathname "path"; String "name"], []), 280, [Optional "linuxxattrs"], + [], + "get a single extended attribute", + "\ +Get a single extended attribute from file C named C. +If C is a symlink, then this call returns an extended +attribute from the symlink. + +Normally it is better to get all extended attributes from a file +in one go by calling C. However some Linux +filesystem implementations are buggy and do not provide a way to +list out attributes. For these filesystems (notably ntfs-3g) +you have to know the names of the extended attributes you want +in advance and call this function. + +Extended attribute values are blobs of binary data. If there +is no extended attribute named C, this returns an error. + +See also: C, C, L."); + ] let all_functions = non_daemon_functions @ daemon_functions