X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=generator%2Fgenerator_actions.ml;h=74b65154a3cd42f5b644a8530b260752a455cc7a;hb=f55b32b2db83495fc0987f0fe0e979818704dff1;hp=44f47df12b58f9e96b0f680518f3bcdc375f18ae;hpb=ef6f877b9df261fad1fbf361b8ce7af1055dfbb7;p=libguestfs.git diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 44f47df..74b6515 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -2273,7 +2273,7 @@ command and it can change in future in ways beyond our control. In other words, the output is not guaranteed by the ABI. See also: L, C, C, -C, C (etc)."); +C, C (etc), C."); ("command", (RString "output", [StringList "arguments"], []), 50, [ProtocolLimitWarning], [InitScratchFS, Always, TestOutput ( @@ -2967,10 +2967,9 @@ Checking or repairing NTFS volumes is not supported This command is entirely equivalent to running C."); ("zero", (RErr, [Device "device"], []), 85, [Progress], - [InitBasicFS, Always, TestOutput ( + [InitBasicFS, Always, TestRun ( [["umount"; "/dev/sda1"]; - ["zero"; "/dev/sda1"]; - ["file"; "/dev/sda1"]], "data")], + ["zero"; "/dev/sda1"]])], "write zeroes to the device", "\ This command writes zeroes over the first few blocks of C. @@ -2979,7 +2978,8 @@ How many blocks are zeroed isn't specified (but it's I enough to securely wipe the device). It should be sufficient to remove any partition tables, filesystem superblocks and so on. -See also: C, C."); +See also: C, C, +C"); ("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [], (* See: @@ -5937,6 +5937,29 @@ Instead, use the autosync flag (C) to control whether or not this operation is performed when the handle is closed."); + ("is_zero", (RBool "zeroflag", [Pathname "path"], []), 283, [], + [InitISOFS, Always, TestOutputTrue ( + [["is_zero"; "/100kallzeroes"]]); + InitISOFS, Always, TestOutputFalse ( + [["is_zero"; "/100kallspaces"]])], + "test if a file contains all zero bytes", + "\ +This returns true iff the file exists and the file is empty or +it contains all zero bytes."); + + ("is_zero_device", (RBool "zeroflag", [Device "device"], []), 284, [], + [InitBasicFS, Always, TestOutputTrue ( + [["umount"; "/dev/sda1"]; + ["zero_device"; "/dev/sda1"]; + ["is_zero_device"; "/dev/sda1"]]); + InitBasicFS, Always, TestOutputFalse ( + [["is_zero_device"; "/dev/sda1"]])], + "test if a device contains all zero bytes", + "\ +This returns true iff the device exists and contains all zero bytes. + +Note that for large devices this can take a long time to run."); + ] let all_functions = non_daemon_functions @ daemon_functions