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 " -list_all Print list of all found devices with advice, vendor"
|
||||||
echo " and model. One per line. Ignore any device names."
|
echo " and model. One per line. Ignore any device names."
|
||||||
echo " Ignore -DO_WRITE."
|
echo " Ignore -DO_WRITE."
|
||||||
echo " -with_vendor_model Print vendor and model with each submitted device."
|
echo " -list_long With each line printed by -list_all or a submitted"
|
||||||
echo
|
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 " -max_size n[M|G|T] Set upper byte size limit for advisable devices."
|
||||||
echo " Plain numbers get rounded down to full millions."
|
echo " Plain numbers get rounded down to full millions."
|
||||||
echo " Suffix: M = million, G = billion, T = trillion."
|
echo " Suffix: M = million, G = billion, T = trillion."
|
||||||
@ -162,7 +165,6 @@ check_parameter() {
|
|||||||
reset_job() {
|
reset_job() {
|
||||||
list_all=
|
list_all=
|
||||||
do_list_long=
|
do_list_long=
|
||||||
do_list_long_after=
|
|
||||||
show_reasons=
|
show_reasons=
|
||||||
look_for_iso=
|
look_for_iso=
|
||||||
devs=
|
devs=
|
||||||
@ -215,12 +217,9 @@ 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"
|
elif test "$i" = "-list_long"
|
||||||
then
|
then
|
||||||
do_list_long=y
|
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
|
||||||
@ -308,12 +307,7 @@ list_long() {
|
|||||||
then
|
then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
local_list_devs=
|
$sudo_cmd "$lsblk_cmd" -o NAME,SIZE,FSTYPE,TRAN,LABEL /dev/"$1"
|
||||||
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
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,12 +582,6 @@ list_devices() {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" 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.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" 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
|
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.
|
for a disk image file and optionally copies the image file to one of them.
|
||||||
.br
|
.br
|
||||||
It is specialized on the device names of the Linux kernel and uses the
|
It is specialized on the device names of the \fBLinux kernel\fR and uses the
|
||||||
capabilities of util\-linux program lsblk. Therefore it refuses to run on
|
capabilities of util\-linux program \fBlsblk\fR.
|
||||||
non\-Linux kernels.
|
Therefore it refuses to run on non\-Linux kernels.
|
||||||
.br
|
.br
|
||||||
.PP
|
.PP
|
||||||
The main purpose of xorriso\-dd\-target is to inspect the device files
|
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
|
It prints on standard output (stdout) only the names of advisable devices
|
||||||
without "/dev/" prefix. One name per line and without any reasoning text.
|
without "/dev/" prefix. One name per line and without any reasoning text.
|
||||||
.br
|
.br
|
||||||
|
The possible sudo password prompt, the message line about sudo, and the
|
||||||
|
empty line after it do not go to stdout.
|
||||||
|
.br
|
||||||
Example:
|
Example:
|
||||||
.br
|
.br
|
||||||
$ xorriso\-dd\-target \-with_sudo
|
$ xorriso\-dd\-target \-with_sudo
|
||||||
@ -95,7 +98,8 @@ sde
|
|||||||
.br
|
.br
|
||||||
For the more curious user, there is option \fB\-list_all\fR which prints
|
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.
|
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
|
.br
|
||||||
Each device is shown by one line of the form
|
Each device is shown by one line of the form
|
||||||
.br
|
.br
|
||||||
@ -115,6 +119,9 @@ the presence of an ISO 9660 filesystem on the device.
|
|||||||
.br
|
.br
|
||||||
\fBinfo\fR is composed from VENDOR and MODEL as told by lsblk.
|
\fBinfo\fR is composed from VENDOR and MODEL as told by lsblk.
|
||||||
.br
|
.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:
|
Example:
|
||||||
.br
|
.br
|
||||||
$ xorriso\-dd\-target \-with_sudo \-list_all
|
$ 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"
|
these devices are inspected. Their result gets listed without the ": info"
|
||||||
part, unless option \fB\-with_vendor_model\fR is given.
|
part, unless option \fB\-with_vendor_model\fR is given.
|
||||||
.br
|
.br
|
||||||
Device names must not begin by '\-' and must be single words. They must
|
Device names must not begin by '\-' and must be single words composed of
|
||||||
not contain '/'. E.g. 'sdc' is valid, '/dev/sdc' is not valid.
|
the characters [A\-za\-z0\-9_/\-]. They should not contain '/'. E.g. 'sdc' is
|
||||||
|
valid, '/dev/sdc' is not valid.
|
||||||
.br
|
.br
|
||||||
If one of the given device names gets not advised, the exit value is 1.
|
If one of the given device names gets not advised, the exit value is 1.
|
||||||
.br
|
.br
|
||||||
@ -357,7 +365,7 @@ A given device name looks like the name of a loop device: loop[0\-9]*.
|
|||||||
.br
|
.br
|
||||||
\fBlooks_like_ramdev\-\fR
|
\fBlooks_like_ramdev\-\fR
|
||||||
.br
|
.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
|
.br
|
||||||
\fBlsblk_no_size\-\fR
|
\fBlsblk_no_size\-\fR
|
||||||
.br
|
.br
|
||||||
@ -428,6 +436,11 @@ begin.
|
|||||||
Print list of all found devices with advice, vendor and model. One per line.
|
Print list of all found devices with advice, vendor and model. One per line.
|
||||||
Ignore any device names. Ignore \-DO_WRITE.
|
Ignore any device names. Ignore \-DO_WRITE.
|
||||||
.TP
|
.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
|
\fB\-with_vendor_model\fR
|
||||||
Print vendor and model with each submitted device name.
|
Print vendor and model with each submitted device name.
|
||||||
.TP
|
.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>.
|
If more privacy is desired, mail to <scdbackup@gmx.net>.
|
||||||
.br
|
.br
|
||||||
Please describe what you expect the program to do, the program arguments
|
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.
|
undesirable outcome of your program run.
|
||||||
.br
|
.br
|
||||||
Expect to get asked more questions before solutions can be proposed.
|
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
|
'xorriso-dd-target' evaluates block devices of the Linux kernel whether
|
||||||
they are suitable targets for a disk image file and optionally copies
|
they are suitable targets for a disk image file and optionally copies
|
||||||
the image file to one of them.
|
the image file to one of them.
|
||||||
It is specialized on the device names of the Linux kernel and uses the
|
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
|
capabilities of util-linux program *lsblk*. Therefore it refuses to run
|
||||||
on non-Linux kernels.
|
on non-Linux kernels.
|
||||||
|
|
||||||
The main purpose of xorriso-dd-target is to inspect the device files
|
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
|
-dummy_force. It prints on standard output (stdout) only the names of
|
||||||
advisable devices without "/dev/" prefix. One name per line and without
|
advisable devices without "/dev/" prefix. One name per line and without
|
||||||
any reasoning text.
|
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:
|
Example:
|
||||||
$ xorriso-dd-target -with_sudo
|
$ xorriso-dd-target -with_sudo
|
||||||
Testing sudo to possibly get password prompting done now:
|
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
|
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.
|
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
|
Each device is shown by one line of the form
|
||||||
name : advice : reasoning : info
|
name : advice : reasoning : info
|
||||||
*name* is the device name without "/dev/" prefix.
|
*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
|
can be overridden by the presence of an ISO 9660 filesystem on the
|
||||||
device.
|
device.
|
||||||
*info* is composed from VENDOR and MODEL as told by lsblk.
|
*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:
|
Example:
|
||||||
$ xorriso-dd-target -with_sudo -list_all
|
$ 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
|
If *device names* are given instead of option -list_all, then only these
|
||||||
devices are inspected. Their result gets listed without the ": info"
|
devices are inspected. Their result gets listed without the ": info"
|
||||||
part, unless option *-with_vendor_model* is given.
|
part, unless option *-with_vendor_model* is given.
|
||||||
Device names must not begin by '-' and must be single words. They must
|
Device names must not begin by '-' and must be single words composed of
|
||||||
not contain '/'. E.g. 'sdc' is valid, '/dev/sdc' is not valid.
|
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.
|
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
|
It makes few sense to give device names which are not listed by
|
||||||
-list_all.
|
-list_all.
|
||||||
@ -292,7 +298,7 @@ fd[0-9]*.
|
|||||||
*looks_like_loopdev-*
|
*looks_like_loopdev-*
|
||||||
A given device name looks like the name of a loop device: loop[0-9]*.
|
A given device name looks like the name of a loop device: loop[0-9]*.
|
||||||
*looks_like_ramdev-*
|
*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]*.
|
zram[0-9]*.
|
||||||
*lsblk_no_size-*
|
*lsblk_no_size-*
|
||||||
A size test is given by -max_size, -min_size, or -image_file but the
|
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
|
-list_all
|
||||||
Print list of all found devices with advice, vendor and model. One
|
Print list of all found devices with advice, vendor and model. One
|
||||||
per line. Ignore any device names. Ignore -DO_WRITE.
|
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
|
-with_vendor_model
|
||||||
Print vendor and model with each submitted device name.
|
Print vendor and model with each submitted device name.
|
||||||
-max_size n[M|G|T]
|
-max_size n[M|G|T]
|
||||||
@ -418,7 +428,7 @@ To report bugs, request help, or suggest enhancements for
|
|||||||
<scdbackup@gmx.net>.
|
<scdbackup@gmx.net>.
|
||||||
|
|
||||||
Please describe what you expect the program to do, the program
|
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.
|
undesirable outcome of your program run.
|
||||||
|
|
||||||
Expect to get asked more questions before solutions can be proposed.
|
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
|
|||||||
|