Removed option -list_long_after, changed -list_long_inline to -list_long
This commit is contained in:
parent
d315b65d17
commit
1b22aa5465
@ -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;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH XORRISO-DD-TARGET 1 "Version 1.5.3, Dec 6, 2019"
|
||||
.TH XORRISO-DD-TARGET 1 "Version 1.5.3, Dec 7, 2019"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -35,9 +35,9 @@ xorriso\-dd\-target \- Device evaluator and disk image copier for GNU/Linux
|
||||
evaluates block devices of the Linux kernel whether they are suitable targets
|
||||
for a disk image file and optionally copies the image file to one of them.
|
||||
.br
|
||||
It is specialized on the device names of the Linux kernel and uses the
|
||||
capabilities of util\-linux program lsblk. Therefore it refuses to run on
|
||||
non\-Linux kernels.
|
||||
It is specialized on the device names of the \fBLinux kernel\fR and uses the
|
||||
capabilities of util\-linux program \fBlsblk\fR.
|
||||
Therefore it refuses to run on non\-Linux kernels.
|
||||
.br
|
||||
.PP
|
||||
The main purpose of xorriso\-dd\-target is to inspect the device files
|
||||
@ -79,6 +79,9 @@ and without options \-list_all, \-plug_test, \-DO_WRITE, \-dummy_force.
|
||||
It prints on standard output (stdout) only the names of advisable devices
|
||||
without "/dev/" prefix. One name per line and without any reasoning text.
|
||||
.br
|
||||
The possible sudo password prompt, the message line about sudo, and the
|
||||
empty line after it do not go to stdout.
|
||||
.br
|
||||
Example:
|
||||
.br
|
||||
$ xorriso\-dd\-target \-with_sudo
|
||||
@ -95,7 +98,8 @@ sde
|
||||
.br
|
||||
For the more curious user, there is option \fB\-list_all\fR which prints
|
||||
the evaluation of each disk\-like device that is listed by program lsblk.
|
||||
Optical drives, floppy disks, RAM block devices are excluded, though.
|
||||
Optical drives, floppy disks, RAM block devices, loop devices are excluded,
|
||||
though.
|
||||
.br
|
||||
Each device is shown by one line of the form
|
||||
.br
|
||||
@ -115,6 +119,9 @@ the presence of an ISO 9660 filesystem on the device.
|
||||
.br
|
||||
\fBinfo\fR is composed from VENDOR and MODEL as told by lsblk.
|
||||
.br
|
||||
Option \fB\-list_long\fR causes with each line an additional listing of
|
||||
the information provided by lsblk which led to the shown reasons.
|
||||
.br
|
||||
Example:
|
||||
.br
|
||||
$ xorriso\-dd\-target \-with_sudo \-list_all
|
||||
@ -135,8 +142,9 @@ If \fBdevice names\fR are given instead of option \-list_all, then only
|
||||
these devices are inspected. Their result gets listed without the ": info"
|
||||
part, unless option \fB\-with_vendor_model\fR is given.
|
||||
.br
|
||||
Device names must not begin by '\-' and must be single words. They must
|
||||
not contain '/'. E.g. 'sdc' is valid, '/dev/sdc' is not valid.
|
||||
Device names must not begin by '\-' and must be single words composed of
|
||||
the characters [A\-za\-z0\-9_/\-]. They should not contain '/'. E.g. 'sdc' is
|
||||
valid, '/dev/sdc' is not valid.
|
||||
.br
|
||||
If one of the given device names gets not advised, the exit value is 1.
|
||||
.br
|
||||
@ -357,7 +365,7 @@ A given device name looks like the name of a loop device: loop[0\-9]*.
|
||||
.br
|
||||
\fBlooks_like_ramdev\-\fR
|
||||
.br
|
||||
A given device name looks like the name of a ram block device: zram[0\-9]*.
|
||||
A given device name looks like the name of a RAM block device: zram[0\-9]*.
|
||||
.br
|
||||
\fBlsblk_no_size\-\fR
|
||||
.br
|
||||
@ -428,6 +436,11 @@ begin.
|
||||
Print list of all found devices with advice, vendor and model. One per line.
|
||||
Ignore any device names. Ignore \-DO_WRITE.
|
||||
.TP
|
||||
\fB\-list_long\fR
|
||||
After each result line, which shows reasons, add an additional listing of
|
||||
the information provided by lsblk which led to the reasons and add an empty
|
||||
line.
|
||||
.TP
|
||||
\fB\-with_vendor_model\fR
|
||||
Print vendor and model with each submitted device name.
|
||||
.TP
|
||||
@ -495,7 +508,7 @@ please send electronic mail to the public list <bug\-xorriso@gnu.org>.
|
||||
If more privacy is desired, mail to <scdbackup@gmx.net>.
|
||||
.br
|
||||
Please describe what you expect the program to do, the program arguments
|
||||
which you used, the messages of \fBxorrisodd\-target\fR, and the
|
||||
which you used, the messages of \fBxorriso\-dd\-target\fR, and the
|
||||
undesirable outcome of your program run.
|
||||
.br
|
||||
Expect to get asked more questions before solutions can be proposed.
|
||||
|
@ -39,8 +39,8 @@ File: xorriso-dd-target.info, Node: Overview, Next: Options, Prev: Top, Up:
|
||||
'xorriso-dd-target' evaluates block devices of the Linux kernel whether
|
||||
they are suitable targets for a disk image file and optionally copies
|
||||
the image file to one of them.
|
||||
It is specialized on the device names of the Linux kernel and uses the
|
||||
capabilities of util-linux program lsblk. Therefore it refuses to run
|
||||
It is specialized on the device names of the *Linux kernel* and uses the
|
||||
capabilities of util-linux program *lsblk*. Therefore it refuses to run
|
||||
on non-Linux kernels.
|
||||
|
||||
The main purpose of xorriso-dd-target is to inspect the device files
|
||||
@ -80,6 +80,8 @@ names and without options -list_all, -plug_test, -DO_WRITE,
|
||||
-dummy_force. It prints on standard output (stdout) only the names of
|
||||
advisable devices without "/dev/" prefix. One name per line and without
|
||||
any reasoning text.
|
||||
The possible sudo password prompt, the message line about sudo, and the
|
||||
empty line after it do not go to stdout.
|
||||
Example:
|
||||
$ xorriso-dd-target -with_sudo
|
||||
Testing sudo to possibly get password prompting done now:
|
||||
@ -96,7 +98,8 @@ File: xorriso-dd-target.info, Node: Listall, Next: Givendevices, Prev: Simple
|
||||
|
||||
For the more curious user, there is option *-list_all* which prints the
|
||||
evaluation of each disk-like device that is listed by program lsblk.
|
||||
Optical drives, floppy disks, RAM block devices are excluded, though.
|
||||
Optical drives, floppy disks, RAM block devices, loop devices are
|
||||
excluded, though.
|
||||
Each device is shown by one line of the form
|
||||
name : advice : reasoning : info
|
||||
*name* is the device name without "/dev/" prefix.
|
||||
@ -110,6 +113,8 @@ advisable. Only if option -look_for_iso is given, a reason "has_XYZ-"
|
||||
can be overridden by the presence of an ISO 9660 filesystem on the
|
||||
device.
|
||||
*info* is composed from VENDOR and MODEL as told by lsblk.
|
||||
Option *-list_long* causes with each line an additional listing of the
|
||||
information provided by lsblk which led to the shown reasons.
|
||||
Example:
|
||||
$ xorriso-dd-target -with_sudo -list_all
|
||||
...
|
||||
@ -127,8 +132,9 @@ File: xorriso-dd-target.info, Node: Givendevices, Next: Plugtest, Prev: Lista
|
||||
If *device names* are given instead of option -list_all, then only these
|
||||
devices are inspected. Their result gets listed without the ": info"
|
||||
part, unless option *-with_vendor_model* is given.
|
||||
Device names must not begin by '-' and must be single words. They must
|
||||
not contain '/'. E.g. 'sdc' is valid, '/dev/sdc' is not valid.
|
||||
Device names must not begin by '-' and must be single words composed of
|
||||
the characters [A-za-z0-9_/-]. They should not contain '/'. E.g.
|
||||
'sdc' is valid, '/dev/sdc' is not valid.
|
||||
If one of the given device names gets not advised, the exit value is 1.
|
||||
It makes few sense to give device names which are not listed by
|
||||
-list_all.
|
||||
@ -292,7 +298,7 @@ fd[0-9]*.
|
||||
*looks_like_loopdev-*
|
||||
A given device name looks like the name of a loop device: loop[0-9]*.
|
||||
*looks_like_ramdev-*
|
||||
A given device name looks like the name of a ram block device:
|
||||
A given device name looks like the name of a RAM block device:
|
||||
zram[0-9]*.
|
||||
*lsblk_no_size-*
|
||||
A size test is given by -max_size, -min_size, or -image_file but the
|
||||
@ -340,6 +346,10 @@ File: xorriso-dd-target.info, Node: Options, Next: Examples, Prev: Overview,
|
||||
-list_all
|
||||
Print list of all found devices with advice, vendor and model. One
|
||||
per line. Ignore any device names. Ignore -DO_WRITE.
|
||||
-list_long
|
||||
After each result line, which shows reasons, add an additional
|
||||
listing of the information provided by lsblk which led to the
|
||||
reasons and add an empty line.
|
||||
-with_vendor_model
|
||||
Print vendor and model with each submitted device name.
|
||||
-max_size n[M|G|T]
|
||||
@ -418,7 +428,7 @@ To report bugs, request help, or suggest enhancements for
|
||||
<scdbackup@gmx.net>.
|
||||
|
||||
Please describe what you expect the program to do, the program
|
||||
arguments which you used, the messages of 'xorrisodd-target', and the
|
||||
arguments which you used, the messages of 'xorriso-dd-target', and the
|
||||
undesirable outcome of your program run.
|
||||
|
||||
Expect to get asked more questions before solutions can be proposed.
|
||||
@ -460,18 +470,19 @@ File: xorriso-dd-target.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal
|
||||
|