lstape: Remove type filter support

There is only one supported tape device type left. A filter command line
option doesn't make any sense anymore.

Remove the functionality and documentation of the --type option.

Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Höppner
2026-02-20 13:48:51 +01:00
parent 4f0dfae97e
commit 1bd8ee4b79
2 changed files with 2 additions and 27 deletions

View File

@@ -28,10 +28,6 @@ function PrintUsage() {
: Print this help text.
: --ccw-only|--scsi-only
: Limit output to CCW or SCSI devices only.
: -t|--type <list of device types>
: Limit output of CCW tape devices to the given
: devices. The list consists of device types
: separated by ','.
: --online|--offline
: Show only devices that are either online or
: offline (only one option is allowed). This
@@ -63,7 +59,6 @@ function PrintVersion()
}
FLSEP=""
DEVLIST="3490"
SHORTID=false
SHOWCCW=true
VERBOSE=false
@@ -77,14 +72,6 @@ while [ $# -ne 0 ]; do
PrintUsage
exit 0
;;
-t|--type)
if [ $# -lt 2 ]; then
RequireArgument $1 1
exit 1
fi
shift
DEVLIST="$1"
;;
--online)
if $FILTEROFFLINE; then
echo -n "Option --online and --offline " >&2
@@ -148,10 +135,6 @@ function SysfsCreateListCCW() {
medium_state_str[1] = "LOADED "
medium_state_str[2] = "UNLOADED"
split("'$DEVLIST'", A, ",")
for(i = 1; i in A; i++) {
devlist[A[i]] = 1
}
shortid = "'$SHORTID'"=="true" ? 1 : 0
filteronline = "'$FILTERONLINE'"=="true" ? 1 : 0
filteroffline = "'$FILTEROFFLINE'"=="true" ? 1 : 0
@@ -168,8 +151,6 @@ function SysfsCreateListCCW() {
devtype = Read(devdir "/devtype")
split(devtype, A, "/")
if (!(A[1] in devlist))
next
online = Read(devdir "/online")
if (filteronline && !online)

View File

@@ -64,12 +64,6 @@ of SCSI tape devices.
Limit output to either online or offline devices. This filter has no effect
on the output of SCSI devices.
.TP
.BR -t | --type " \fI<device-type>\fR"
Limit output to given device types, for example 3490
(currently only applies to channel-attached
tape devices).
.TP
.I <device-bus-ID>
Limits the output to information about the specified tape device or
@@ -131,9 +125,9 @@ The serial number.
List all tape devices that are available
.RE
\fBlstape --ccw-only -t 3490 --online\fR
\fBlstape --ccw-only --online\fR
.RS
Show all 3490 CCW devices that are online.
Show all channel-attached tape devices that are online.
.RE
\fBlstape --scsi-only --verbose\fR