X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fgenerator.ml;h=51d32357296065c7015ee1397b331c4e9d831316;hb=1f6bc26fc0967c6e4ae4a4514d9734288839c0fd;hp=f8e3934f13e29db044e8e9b77e91c671e4e04d4a;hpb=675411d34f807420d1b714436fc5a58fc0022dae;p=libguestfs.git diff --git a/src/generator.ml b/src/generator.ml index f8e3934..51d3235 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1982,7 +1982,9 @@ This command writes zeroes over the first few blocks of C. 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."); +any partition tables, filesystem superblocks and so on. + +See also: C."); ("grub_install", (RErr, [String "root"; String "device"]), 86, [], [InitBasicFS, Always, TestOutputTrue ( @@ -2402,6 +2404,44 @@ It is just a wrapper around the C L function with flags C. See that manual page for more details."); + ("scrub_device", (RErr, [String "device"]), 114, [DangerWillRobinson], + [InitNone, Always, TestRun ( (* use /dev/sdc because it's smaller *) + [["scrub_device"; "/dev/sdc"]])], + "scrub (securely wipe) a device", + "\ +This command writes patterns over C to make data retrieval +more difficult. + +It is an interface to the L program. See that +manual page for more details."); + + ("scrub_file", (RErr, [String "file"]), 115, [], + [InitBasicFS, Always, TestRun ( + [["write_file"; "/file"; "content"; "0"]; + ["scrub_file"; "/file"]])], + "scrub (securely wipe) a file", + "\ +This command writes patterns over a file to make data retrieval +more difficult. + +The file is I after scrubbing. + +It is an interface to the L program. See that +manual page for more details."); + + ("scrub_freespace", (RErr, [String "dir"]), 116, [], + [], (* XXX needs testing *) + "scrub (securely wipe) free space", + "\ +This command creates the directory C and then fills it +with files until the filesystem is full, and scrubs the files +as for C, and deletes them. +The intention is to scrub any free space on the partition +containing C. + +It is an interface to the L program. See that +manual page for more details."); + ] let all_functions = non_daemon_functions @ daemon_functions @@ -7789,6 +7829,19 @@ and generate_lang_bindtests call = (* XXX Add here tests of the return and error functions. *) +(* This is used to generate the src/MAX_PROC_NR file which + * contains the maximum procedure number, a surrogate for the + * ABI version number. See src/Makefile.am for the details. + *) +and generate_max_proc_nr () = + let proc_nrs = List.map ( + fun (_, _, proc_nr, _, _, _, _) -> proc_nr + ) daemon_functions in + + let max_proc_nr = List.fold_left max 0 proc_nrs in + + pr "%d\n" max_proc_nr + let output_to filename = let filename_new = filename ^ ".new" in chan := open_out filename_new; @@ -7961,3 +8014,7 @@ Run it from the top source directory using the command let close = output_to "haskell/bindtests.hs" in generate_haskell_bindtests (); close (); + + let close = output_to "src/MAX_PROC_NR" in + generate_max_proc_nr (); + close ();