Rejecting zram[0-9] as candidate device

master
Thomas Schmitt 3 years ago
parent c0b650bebb
commit 5e727b43ad
  1. 16
      xorriso-dd-target/xorriso-dd-target
  2. 12
      xorriso-dd-target/xorriso-dd-target.1
  3. 34
      xorriso-dd-target/xorriso-dd-target.info
  4. 12
      xorriso-dd-target/xorriso-dd-target.texi

@ -334,8 +334,9 @@ list_devices() {
fi
if test -z "$devs"
then
# Obtain list of top-level names which do not look like CD or floppy.
devs=$("$lsblk_cmd" -d -n -o NAME | grep -v '^sr[0-9]' | grep -v '^fd[0-9]')
# Obtain list of top-level names which do not look like CD, floppy, RAM dev
devs=$("$lsblk_cmd" -d -n -o NAME | grep -v '^sr[0-9]' \
| grep -v '^fd[0-9]' | grep -v '^zram[0-9]')
fi
not_advised=0
@ -356,11 +357,18 @@ list_devices() {
then
yucky=y
reasons="${reasons}looks_like_disk_partition- "
fi
if echo "$name" | grep '^sr[0-9]' >/dev/null
elif echo "$name" | grep '^sr[0-9]' >/dev/null
then
yucky=y
reasons="${reasons}looks_like_cd_drive- "
elif echo "$name" | grep '^fd[0-9]' >/dev/null
then
yucky=y
reasons="${reasons}looks_like_floppy- "
elif echo "$name" | grep '^zram[0-9]' >/dev/null
then
yucky=y
reasons="${reasons}looks_like_ramdev- "
fi
# >>> recognize the device from which Debian Live booted

@ -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 2, 2019"
.TH XORRISO-DD-TARGET 1 "Version 1.5.3, Dec 5, 2019"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -95,7 +95,7 @@ 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 and floppy disks are excluded, though.
Optical drives, floppy disks, RAM block devices are excluded, though.
.br
Each device is shown by one line of the form
.br
@ -336,6 +336,14 @@ This reason overrides any "has_XYZ\-" reason.
A given device name looks like the name of an optical drive: sr[0\-9]*.
Use program \fBxorrecord\fR for this kind of devices.
.br
\fBlooks_like_floppy\-\fR
.br
A given device name looks like the name of a floppy disk drive: fd[0\-9]*.
.br
\fBlooks_like_ramdev\-\fR
.br
A given device name looks like the name of a ram block device: zram[0\-9]*.
.br
\fBlooks_like_disk_partition\-\fR
.br
A given device name looks like the name of a partition. Expected are names

@ -96,7 +96,7 @@ 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 and floppy disks are excluded, though.
Optical drives, floppy disks, RAM block 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.
@ -279,6 +279,12 @@ This reason overrides any "has_XYZ-" reason.
*looks_like_cd_drive-*
A given device name looks like the name of an optical drive: sr[0-9]*.
Use program *xorrecord* for this kind of devices.
*looks_like_floppy-*
A given device name looks like the name of a floppy disk drive:
fd[0-9]*.
*looks_like_ramdev-*
A given device name looks like the name of a ram block device:
zram[0-9]*.
*looks_like_disk_partition-*
A given device name looks like the name of a partition. Expected are
names of base devices, like "sde", not of their partitions, like "sde1".
@ -502,18 +508,18 @@ Node: Top429
Node: Overview996
Node: Simplenames2788
Node: Listall3399
Node: Givendevices4809
Node: Plugtest5611
Node: Dowrite7451
Node: Unwise8566
Node: Reasons9922
Node: Options12220
Node: Examples14840
Node: Files15013
Node: Seealso15171
Node: Bugreport15337
Node: Legal15923
Node: CommandIdx16627
Node: ConceptIdx17674
Node: Givendevices4825
Node: Plugtest5627
Node: Dowrite7467
Node: Unwise8582
Node: Reasons9938
Node: Options12427
Node: Examples15047
Node: Files15220
Node: Seealso15378
Node: Bugreport15544
Node: Legal16130
Node: CommandIdx16834
Node: ConceptIdx17881

End Tag Table

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.3, Dec 2, 2019"
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.3, Dec 5, 2019"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -191,7 +191,7 @@ sde
@cindex Use case, list all devices with reasoning
For the more curious user, there is option @strong{-list_all} which prints
the evaluation of each disk-like device that is listed by program lsblk.
Optical drives and floppy disks are excluded, though.
Optical drives, floppy disks, RAM block devices are excluded, though.
@*
Each device is shown by one line of the form
@*
@ -453,6 +453,14 @@ Use program @strong{xorrecord} for this kind of devices.
A given device name looks like the name of a partition. Expected are names
of base devices, like "sde", not of their partitions, like "sde1".
@*
@strong{looks_like_floppy-}
@*
A given device name looks like the name of a floppy disk drive: fd[0-9]*.
@*
@strong{looks_like_ramdev-}
@*
A given device name looks like the name of a ram block device: zram[0-9]*.
@*
@strong{lsblk_no_size-}
@*
A size test is given by -max_size, -min_size, or -image_file but the size of

Loading…
Cancel
Save