diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-03 02:28:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-03 02:28:51 +0000 |
commit | 984c025734e1ac79a5b1556be3420941cda7c751 (patch) | |
tree | b3fdc2b8a79928d93586a5b322d8c63892bfa223 /move/move.pm | |
parent | 3793a87b4e844e44bfc5263e4998843787ceba22 (diff) | |
download | drakx-984c025734e1ac79a5b1556be3420941cda7c751.tar drakx-984c025734e1ac79a5b1556be3420941cda7c751.tar.gz drakx-984c025734e1ac79a5b1556be3420941cda7c751.tar.bz2 drakx-984c025734e1ac79a5b1556be3420941cda7c751.tar.xz drakx-984c025734e1ac79a5b1556be3420941cda7c751.zip |
- add a warning before formatting the key (in the "formatkey" case)
- if no key is found, go on
Diffstat (limited to 'move/move.pm')
-rw-r--r-- | move/move.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/move/move.pm b/move/move.pm index 1b9ecf61e..093a56165 100644 --- a/move/move.pm +++ b/move/move.pm @@ -288,10 +288,15 @@ sub handleI18NClp { sub clean_partition_table_and_format_key { my ($in) = @_; - my @keys = grep { detect_devices::isKeyUsb($_) } detect_devices::getSCSI(); + my @keys = grep { detect_devices::isKeyUsb($_) } detect_devices::getSCSI() or return; my $key = $in->ask_from_listf('', N("Which USB key do you want to format?"), sub { "$_->{usb_description} ($_->{device})" }, \@keys); + + $in->ask_warn('', N("You are about to format a USB device \"%s\". This will delete all data on it. +Make sure that the selected device is the USB key you want to format. +We advise you to unplug all other USB storage devices while doing this operation.", $key->{usb_description})); + $key->{prefix} ||= $key->{device}; add2hash_($key, partition_table::raw::get_geometry($key->{file} = devices::make($key->{device}))); partition_table::raw::zero_MBR($key); |