]> git.ipfire.org Git - thirdparty/util-linux.git/commit
eject: check for hotplug/removable attribute
authorKarel Zak <kzak@redhat.com>
Thu, 5 Apr 2012 10:06:23 +0000 (12:06 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Apr 2012 10:06:23 +0000 (12:06 +0200)
commitde12e1bba1c4318dadfde0d3d69eabe913d072a3
tree6cc4fcb80da1a2422ec76dcf0f40975cdfaff840
parent15c939c848a1794396c7ea20cb34ee329d6e8609
eject: check for hotplug/removable attribute

 * based on code from Fedora

 * supported are only:

   - /sys/dev/block/<maj:min>/removable devices
   - devices connected by usb, ieee1394, pcmcia, mmc or ccw subsystem.

Frankly, this heuristic sucks -- all is hot-pluggable in this days,
but it's probably good idea to restrict the default behavior to avoid
user's mistakes.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/eject.c