From 51994a75718581836fd00b06c94ea86de4fdf432 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 7 Dec 2019 09:58:55 +0100 Subject: [PATCH] Experimental options -list_long_inline -list_long_after --- xorriso-dd-target/xorriso-dd-target | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/xorriso-dd-target/xorriso-dd-target b/xorriso-dd-target/xorriso-dd-target index 95086e4f..ceeaf2f8 100755 --- a/xorriso-dd-target/xorriso-dd-target +++ b/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; }