generator: Remove DangerWillRobinson.

This warning was applied unevenly.  Potentially any command can be
dangerous or safe, so it was a needless warning.
This commit is contained in:
Richard W.M. Jones
2011-10-27 13:45:22 +01:00
parent 7b44f7b3df
commit 6edd6cdeba
10 changed files with 9 additions and 44 deletions

View File

@@ -2257,7 +2257,7 @@ example C<ext3>.");
("sfdisk", (RErr, [Device "device";
Int "cyls"; Int "heads"; Int "sectors";
StringList "lines"], []), 43, [DangerWillRobinson; DeprecatedBy "part_add"],
StringList "lines"], []), 43, [DeprecatedBy "part_add"],
[],
"create partitions on a block device",
"\
@@ -2358,7 +2358,7 @@ This unmounts all mounted filesystems.
Some internal mounts are not unmounted by this call.");
("lvm_remove_all", (RErr, [], []), 48, [DangerWillRobinson; Optional "lvm2"],
("lvm_remove_all", (RErr, [], []), 48, [Optional "lvm2"],
[],
"remove all LVM LVs, VGs and PVs",
"\
@@ -3371,7 +3371,7 @@ volume to match the new size of the underlying device.");
("sfdisk_N", (RErr, [Device "device"; Int "partnum";
Int "cyls"; Int "heads"; Int "sectors";
String "line"], []), 99, [DangerWillRobinson; DeprecatedBy "part_add"],
String "line"], []), 99, [DeprecatedBy "part_add"],
[],
"modify a single partition on a block device",
"\
@@ -3617,7 +3617,7 @@ It is just a wrapper around the C L<glob(3)> function
with flags C<GLOB_MARK|GLOB_BRACE>.
See that manual page for more details.");
("scrub_device", (RErr, [Device "device"], []), 114, [DangerWillRobinson; Optional "scrub"],
("scrub_device", (RErr, [Device "device"], []), 114, [Optional "scrub"],
[InitNone, Always, TestRun ( (* use /dev/sdc because it's smaller *)
[["scrub_device"; "/dev/sdc"]])],
"scrub (securely wipe) a device",
@@ -3996,7 +3996,7 @@ This function is primarily intended for use by programs. To
get a simple list of names, use C<guestfs_ls>. To get a printable
directory for human consumption, use C<guestfs_ll>.");
("sfdiskM", (RErr, [Device "device"; StringList "lines"], []), 139, [DangerWillRobinson; DeprecatedBy "part_add"],
("sfdiskM", (RErr, [Device "device"; StringList "lines"], []), 139, [DeprecatedBy "part_add"],
[],
"create partitions on a block device",
"\
@@ -5059,7 +5059,7 @@ backwards from the end of the disk (C<-1> is the last sector).
Creating a partition which covers the whole disk is not so easy.
Use C<guestfs_part_disk> to do that.");
("part_disk", (RErr, [Device "device"; String "parttype"], []), 210, [DangerWillRobinson],
("part_disk", (RErr, [Device "device"; String "parttype"], []), 210, [],
[InitEmpty, Always, TestRun (
[["part_disk"; "/dev/sda"; "mbr"]]);
InitEmpty, Always, TestRun (
@@ -5341,7 +5341,7 @@ or file C<src> to another destination device or file C<dest>.
Note this will fail if the source is too short or if the destination
is not large enough.");
("zero_device", (RErr, [Device "device"], []), 228, [DangerWillRobinson; Progress],
("zero_device", (RErr, [Device "device"], []), 228, [Progress],
[InitBasicFSonLVM, Always, TestRun (
[["zero_device"; "/dev/VG/LV"]])],
"write zeroes to an entire device",
@@ -5760,7 +5760,7 @@ C<device> parameter must be the name of the LUKS mapping
device (ie. C</dev/mapper/mapname>) and I<not> the name
of the underlying block device.");
("luks_format", (RErr, [Device "device"; Key "key"; Int "keyslot"], []), 260, [Optional "luks"; DangerWillRobinson],
("luks_format", (RErr, [Device "device"; Key "key"; Int "keyslot"], []), 260, [Optional "luks"],
[],
"format a block device as a LUKS encrypted device",
"\
@@ -5769,7 +5769,7 @@ the device as a LUKS encrypted device. C<key> is the
initial key, which is added to key slot C<slot>. (LUKS
supports 8 key slots, numbered 0-7).");
("luks_format_cipher", (RErr, [Device "device"; Key "key"; Int "keyslot"; String "cipher"], []), 261, [Optional "luks"; DangerWillRobinson],
("luks_format_cipher", (RErr, [Device "device"; Key "key"; Int "keyslot"; String "cipher"], []), 261, [Optional "luks"],
[],
"format a block device as a LUKS encrypted device",
"\

View File

@@ -254,8 +254,6 @@ I<The caller must free the returned buffer after use>.\n\n"
pr "%s\n\n" progress_message;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
if List.mem DangerWillRobinson flags then
pr "%s\n\n" danger_will_robinson;
if List.exists (function Key _ -> true | _ -> false) (args@optargs) then
pr "This function takes a key or passphrase parameter which
could contain sensitive material. Read the section

View File

@@ -194,7 +194,6 @@ let () =
List.iter (
function
| ProtocolLimitWarning
| DangerWillRobinson
| FishOutput _
| NotInFish
| NotInDocs

View File

@@ -36,10 +36,6 @@ let protocol_limit_warning =
"Because of the message protocol, there is a transfer limit
of somewhere between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
let danger_will_robinson =
"B<This command is dangerous. Without careful use you
can easily destroy all your data>."
let deprecation_notice ?(prefix = "") flags =
try
let alt =

View File

@@ -136,16 +136,6 @@ Guestfish will prompt for these separately."
("\n\n" ^ protocol_limit_warning)
else "" in
(* For DangerWillRobinson commands, we should probably have
* guestfish prompt before allowing you to use them (especially
* in interactive mode). XXX
*)
let warnings =
warnings ^
if List.mem DangerWillRobinson flags then
("\n\n" ^ danger_will_robinson)
else "" in
let warnings =
warnings ^
match deprecation_notice flags with
@@ -865,9 +855,6 @@ Guestfish will prompt for these separately.\n\n";
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
if List.mem DangerWillRobinson flags then
pr "%s\n\n" danger_will_robinson;
match deprecation_notice flags with
| None -> ()
| Some txt -> pr "%s\n\n" txt

View File

@@ -112,10 +112,6 @@ public class GuestFS {
if List.mem ProtocolLimitWarning flags then
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
if List.mem DangerWillRobinson flags then
doc ^ "\n\n" ^ danger_will_robinson
else doc in
let doc =
match deprecation_notice flags with
| None -> doc

View File

@@ -804,8 +804,6 @@ handlers and threads.
pr "%s\n\n" longdesc;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
if List.mem DangerWillRobinson flags then
pr "%s\n\n" danger_will_robinson;
match deprecation_notice flags with
| None -> ()
| Some txt -> pr "%s\n\n" txt

View File

@@ -641,10 +641,6 @@ class GuestFS:
if List.mem ProtocolLimitWarning flags then
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
if List.mem DangerWillRobinson flags then
doc ^ "\n\n" ^ danger_will_robinson
else doc in
let doc =
match deprecation_notice flags with
| None -> doc

View File

@@ -345,10 +345,6 @@ ruby_user_cancel (VALUE gv)
if List.mem ProtocolLimitWarning flags then
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
if List.mem DangerWillRobinson flags then
doc ^ "\n\n" ^ danger_will_robinson
else doc in
let doc =
match deprecation_notice flags with
| None -> doc

View File

@@ -207,7 +207,6 @@ type errcode = [ `CannotReturnError | `ErrorIsMinusOne | `ErrorIsNULL ]
type flags =
| ProtocolLimitWarning (* display warning about protocol size limits *)
| DangerWillRobinson (* flags particularly dangerous commands *)
| FishAlias of string (* provide an alias for this cmd in guestfish *)
| FishOutput of fish_output_t (* how to display output in guestfish *)
| NotInFish (* do not export via guestfish *)