mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
This should be more stable than parsing the IBM lin_tape proc-fs output. If sysfs is not available or provides no match, fall back to proc-fs. An alternative to "ls -1d ... | head -n1" would have been to use "shopt -s extglob; ls -d $SCSI_DEV/lin_tape/$DEV_NAME+([0-9])" but I did not want to have to rely on extglob potentially influencing other old code of lstape. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>