mirror of
https://github.com/iustin/mt-st.git
synced 2026-01-05 03:43:59 +00:00
Use of sysfs instead of udevadm
This commit is contained in:
committed by
Iustin Pop
parent
639ece4580
commit
1aaca9a944
@@ -15,15 +15,11 @@ _mt () {
|
||||
return
|
||||
;;
|
||||
-f )
|
||||
if [ -x "$(command -v udevadm)" ]; then
|
||||
#list tape devices
|
||||
for d in `udevadm trigger --verbose --dry-run --type=devices --subsystem-match=scsi_tape`; do
|
||||
devs+="/dev/${d##*/} "
|
||||
done
|
||||
COMPREPLY=($(compgen -W "$devs" -- "$cur"))
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
#list tape devices
|
||||
for tape in /sys/class/scsi_tape/*;
|
||||
do devs+="/dev/${tape##*/} ";
|
||||
done;
|
||||
COMPREPLY=($(compgen -W "$devs" -- "$cur"))
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user