Removed option -list_long_after, changed -list_long_inline to -list_long

This commit is contained in:
2019-12-07 21:28:13 +01:00
parent d315b65d17
commit 1b22aa5465
4 changed files with 107 additions and 79 deletions

View File

@ -76,8 +76,11 @@ print_usage() {
echo " -list_all Print list of all found devices with advice, vendor"
echo " and model. One per line. Ignore any device names."
echo " Ignore -DO_WRITE."
echo " -with_vendor_model Print vendor and model with each submitted device."
echo
echo " -list_long With each line printed by -list_all or a submitted"
echo " device name, let lsblk print info which led to the"
echo " shown reasons."
echo " -with_vendor_model Print vendor and model with each submitted device"
echo " name."
echo " -max_size n[M|G|T] Set upper byte size limit for advisable devices."
echo " Plain numbers get rounded down to full millions."
echo " Suffix: M = million, G = billion, T = trillion."
@ -162,7 +165,6 @@ check_parameter() {
reset_job() {
list_all=
do_list_long=
do_list_long_after=
show_reasons=
look_for_iso=
devs=
@ -215,12 +217,9 @@ arg_interpreter() {
list_all=y
with_vendor_model=y
show_reasons=y
elif test "$i" = "-list_long_inline"
elif test "$i" = "-list_long"
then
do_list_long=y
elif test "$i" = "-list_long_after"
then
do_list_long_after=y
elif test "$i" = "-plug_test"
then
do_plug_test=y
@ -308,12 +307,7 @@ list_long() {
then
return 0
fi
local_list_devs=
for i in "$@"
do
local_list_devs="${local_list_devs}/dev/$i "
done
$sudo_cmd "$lsblk_cmd" -o NAME,SIZE,FSTYPE,TRAN,LABEL $local_list_devs
$sudo_cmd "$lsblk_cmd" -o NAME,SIZE,FSTYPE,TRAN,LABEL /dev/"$1"
echo
}
@ -588,12 +582,6 @@ list_devices() {
fi
fi
done
if test -n "$show_reasons" -a -n "$do_list_long_after"
then
echo
do_list_long=y
list_long $devs
fi
return 0;
}