Experimental options -list_long_inline -list_long_after

master
Thomas Schmitt 3 years ago
parent fd04b110fd
commit 51994a7571
  1. 31
      xorriso-dd-target/xorriso-dd-target

@ -136,6 +136,8 @@ round_down_div_million() {
# Settings
reset_job() {
list_all=
do_list_long=
do_list_long_after=
show_reasons=
look_for_iso=
devs=
@ -185,6 +187,12 @@ arg_interpreter() {
list_all=y
with_vendor_model=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"
then
do_plug_test=y
@ -272,6 +280,21 @@ collect_devices() {
| 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
plug_in_watcher() {
found_devices=
@ -531,17 +554,25 @@ list_devices() {
if test -n "$show_reasons"
then
echo "$name : NO : $reasons$descr"
list_long "$name"
fi
not_advised=1
else
if test -n "$show_reasons"
then
echo "$name : YES : $reasons$descr"
list_long "$name"
else
echo "$name"
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;
}

Loading…
Cancel
Save