Experimental options -list_long_inline -list_long_after
This commit is contained in:
parent
fd04b110fd
commit
51994a7571
@ -136,6 +136,8 @@ round_down_div_million() {
|
|||||||
# Settings
|
# Settings
|
||||||
reset_job() {
|
reset_job() {
|
||||||
list_all=
|
list_all=
|
||||||
|
do_list_long=
|
||||||
|
do_list_long_after=
|
||||||
show_reasons=
|
show_reasons=
|
||||||
look_for_iso=
|
look_for_iso=
|
||||||
devs=
|
devs=
|
||||||
@ -185,6 +187,12 @@ arg_interpreter() {
|
|||||||
list_all=y
|
list_all=y
|
||||||
with_vendor_model=y
|
with_vendor_model=y
|
||||||
show_reasons=y
|
show_reasons=y
|
||||||
|
elif test "$i" = "-list_long_inline"
|
||||||
|
then
|
||||||
|
do_list_long=y
|
||||||
|
elif test "$i" = "-list_long_after"
|
||||||
|
then
|
||||||
|
do_list_long_after=y
|
||||||
elif test "$i" = "-plug_test"
|
elif test "$i" = "-plug_test"
|
||||||
then
|
then
|
||||||
do_plug_test=y
|
do_plug_test=y
|
||||||
@ -272,6 +280,21 @@ collect_devices() {
|
|||||||
| tr '\n\r' ' '
|
| tr '\n\r' ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Let lsblk print extra info for the given devices
|
||||||
|
list_long() {
|
||||||
|
if test -z "$do_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
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
## Trying to find the desired device by watching plug-in effects
|
## Trying to find the desired device by watching plug-in effects
|
||||||
plug_in_watcher() {
|
plug_in_watcher() {
|
||||||
found_devices=
|
found_devices=
|
||||||
@ -531,17 +554,25 @@ list_devices() {
|
|||||||
if test -n "$show_reasons"
|
if test -n "$show_reasons"
|
||||||
then
|
then
|
||||||
echo "$name : NO : $reasons$descr"
|
echo "$name : NO : $reasons$descr"
|
||||||
|
list_long "$name"
|
||||||
fi
|
fi
|
||||||
not_advised=1
|
not_advised=1
|
||||||
else
|
else
|
||||||
if test -n "$show_reasons"
|
if test -n "$show_reasons"
|
||||||
then
|
then
|
||||||
echo "$name : YES : $reasons$descr"
|
echo "$name : YES : $reasons$descr"
|
||||||
|
list_long "$name"
|
||||||
else
|
else
|
||||||
echo "$name"
|
echo "$name"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if test -n "$show_reasons" -a -n "$do_list_long_after"
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
do_list_long=y
|
||||||
|
list_long $devs
|
||||||
|
fi
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user