This warning was applied unevenly. Potentially any command can be
dangerous or safe, so it was a needless warning.
("sfdisk", (RErr, [Device "device";
Int "cyls"; Int "heads"; Int "sectors";
("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",
"\
[],
"create partitions on a block device",
"\
Some internal mounts are not unmounted by this call.");
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",
"\
[],
"remove all LVM LVs, VGs and PVs",
"\
("sfdisk_N", (RErr, [Device "device"; Int "partnum";
Int "cyls"; Int "heads"; Int "sectors";
("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",
"\
[],
"modify a single partition on a block device",
"\
with flags C<GLOB_MARK|GLOB_BRACE>.
See that manual page for more details.");
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",
[InitNone, Always, TestRun ( (* use /dev/sdc because it's smaller *)
[["scrub_device"; "/dev/sdc"]])],
"scrub (securely wipe) a device",
get a simple list of names, use C<guestfs_ls>. To get a printable
directory for human consumption, use C<guestfs_ll>.");
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",
"\
[],
"create partitions on a block device",
"\
Creating a partition which covers the whole disk is not so easy.
Use C<guestfs_part_disk> to do that.");
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 (
[InitEmpty, Always, TestRun (
[["part_disk"; "/dev/sda"; "mbr"]]);
InitEmpty, Always, TestRun (
Note this will fail if the source is too short or if the destination
is not large enough.");
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",
[InitBasicFSonLVM, Always, TestRun (
[["zero_device"; "/dev/VG/LV"]])],
"write zeroes to an entire device",
device (ie. C</dev/mapper/mapname>) and I<not> the name
of the underlying block device.");
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",
"\
[],
"format a block device as a LUKS encrypted device",
"\
initial key, which is added to key slot C<slot>. (LUKS
supports 8 key slots, numbered 0-7).");
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",
"\
[],
"format a block device as a LUKS encrypted device",
"\
pr "%s\n\n" progress_message;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
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
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
List.iter (
function
| ProtocolLimitWarning
List.iter (
function
| ProtocolLimitWarning
| FishOutput _
| NotInFish
| NotInDocs
| FishOutput _
| NotInFish
| NotInDocs
"Because of the message protocol, there is a transfer limit
of somewhere between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
"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 =
let deprecation_notice ?(prefix = "") flags =
try
let alt =
("\n\n" ^ protocol_limit_warning)
else "" in
("\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
let warnings =
warnings ^
match deprecation_notice flags with
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
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
match deprecation_notice flags with
| None -> ()
| Some txt -> pr "%s\n\n" txt
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
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
| Some txt -> doc ^ "\n\n" ^ txt in
match deprecation_notice flags with
| None -> doc
| Some txt -> doc ^ "\n\n" ^ txt in
pr "%s\n\n" longdesc;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
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
match deprecation_notice flags with
| None -> ()
| Some txt -> pr "%s\n\n" txt
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
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
| Some txt -> doc ^ "\n\n" ^ txt in
match deprecation_notice flags with
| None -> doc
| Some txt -> doc ^ "\n\n" ^ txt in
doc ^ "\n\n" ^ protocol_limit_warning
else doc in
let doc =
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
| Some txt -> doc ^ "\n\n" ^ txt in
match deprecation_notice flags with
| None -> doc
| Some txt -> doc ^ "\n\n" ^ txt in
type flags =
| ProtocolLimitWarning (* display warning about protocol size limits *)
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 *)
| 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 *)