util-linux/sys-utils
Karel Zak 90a0e97c7b eject: Check host_status and driver_status when using SG_IO.
Based on Suse patch, originally from
	Anna Bernathova <anicka@suse.cz>, May 2008

  SG_IO completion status is weird but still well defined. You'll need
  to check both host_status, driver_status and status to determine that
  a command actually succeeded. -- Tejun Heo, May 2008

Note that we also need to check driver_status and sense_buffer to
detect situation when there is no medium. It's valid request to call
eject(8) for device with no medium.

References: https://bugzilla.novell.com/show_bug.cgi?id=358033
Signed-off-by: Anna Bernathova <anicka@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-06-18 12:24:28 +02:00
..
.gitignore build-sys: cleanup .gitignore files 2012-06-26 20:50:54 +02:00
Makemodule.am lscpu: detect more hypervisor vendors 2013-05-20 16:30:23 +02:00
blkdiscard.8 docs: add TB to list of supported suffixes 2013-03-18 18:31:07 +01:00
blkdiscard.c textual: fix several typos and angular brackets in messages 2013-06-07 12:11:14 +02:00
chcpu.8 docs: clean up chcpu.8 manual 2012-06-02 21:18:04 +02:00
chcpu.c chcpu: clean up error messages 2013-05-14 23:33:59 +02:00
ctrlaltdel.8 docs: mention long options in ctrlaltdel.8 2011-09-17 14:25:20 +02:00
ctrlaltdel.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
cyclades.h Imported from util-linux-2.12i tarball. 2006-12-07 00:26:22 +01:00
cytune.8 docs: remove repeated words [checkmans.sh] 2013-04-09 12:26:48 +02:00
cytune.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
dmesg.1 dmesg: support --color[={auto,always,never}] 2013-05-06 19:11:28 +02:00
dmesg.c lib/colors: add colormode_or_err() 2013-05-07 09:09:35 +02:00
eject.1 fix bold style of man page references 2012-10-09 12:12:48 +02:00
eject.c eject: Check host_status and driver_status when using SG_IO. 2013-06-18 12:24:28 +02:00
fallocate.1 docs: add TB to list of supported suffixes 2013-03-18 18:31:07 +01:00
fallocate.c fallocate: check writing to a file descriptor was successful 2013-04-26 13:26:07 +02:00
flock.1 flock: improve usage strings 2013-01-09 13:36:58 +01:00
flock.c textual: fix several typos and angular brackets in messages 2013-06-07 12:11:14 +02:00
fsfreeze.8 fsfreeze: add note about atime to the man page 2013-04-08 13:32:16 +02:00
fsfreeze.c fsfreeze: tell user when mandatory option is not specified 2013-04-05 13:56:00 +02:00
fstab.5 mount: (new) add note about unsupported 'ignore' fstype to fstab.5 2012-06-19 12:04:03 +02:00
fstrim.8 docs: add TB to list of supported suffixes 2013-03-18 18:31:07 +01:00
fstrim.c fstrim: remove unnecessary "were" from verbose message 2013-01-30 15:59:58 +01:00
hwclock-cmos.c hwclock: use warn() to print cmos errors 2013-05-14 23:41:32 +02:00
hwclock-kd.c include/c: move usleep() fallback to c.h 2012-10-22 11:03:09 +02:00
hwclock-rtc.c hwclock: cleanup _() usage in synchronize_to_clock_tick_rtc() 2013-03-21 08:56:15 +01:00
hwclock.8 docs: remove repeated words 2013-04-05 13:35:30 +02:00
hwclock.c include/pathnames: rename _PATH_ADJPATH to _PATH_ADJTIME 2013-03-26 11:45:45 +01:00
hwclock.h blkid, hwclock, ldattach: use program_invocation_short_name 2013-04-26 13:25:57 +02:00
ipcmk.1 docs: fix all man page groff warnings 2012-06-02 20:29:12 +02:00
ipcmk.c ipcmk: use random_get_bytes() to generate IPC keys 2013-01-24 16:27:04 +01:00
ipcrm.1 Restore use of correct alternation syntax using { | }. 2013-06-10 17:18:15 -04:00
ipcrm.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
ipcs.1 docs: improve wording, formatting and accuracy of ipcs man page 2013-02-06 10:56:49 +01:00
ipcs.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
ipcutils.c ipcs: fix compiler warning [clang -Wuninitialized] 2013-03-20 15:20:47 +01:00
ipcutils.h ipcs: fix compiler warnings, use 64bit time 2012-12-20 19:52:16 +01:00
ldattach.8 docs: uniformize the header and footer lines in man pages 2011-08-22 10:39:21 +02:00
ldattach.c blkid, hwclock, ldattach: use program_invocation_short_name 2013-04-26 13:25:57 +02:00
losetup.8 losetup: add --raw and --noheadings 2013-05-13 12:00:24 +02:00
losetup.c textual: improve clarity of some error messages 2013-06-07 12:29:44 +02:00
lp.h Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
lscpu-dmi.c lscpu: detect more hypervisor vendors 2013-05-20 16:30:23 +02:00
lscpu.1 docs: add lscpu max mhz to manual and bash completion 2013-06-07 12:24:44 +02:00
lscpu.c lscpu: add max MHz value to make cpu governor effects more visible 2013-06-07 12:24:42 +02:00
lscpu.h lscpu: detect more hypervisor vendors 2013-05-20 16:30:23 +02:00
mount.8 mount: fix mistaken word and some grammar in man page of mount 2013-06-18 10:42:55 +02:00
mount.c libmount: more robust options string parsing 2013-05-30 13:29:34 +02:00
mountpoint.1 libmount: document LIBMOUNT_DEBUG users 2012-09-04 17:21:57 +02:00
mountpoint.c mountpoint: don't hardcode paths 2013-02-14 15:46:06 +01:00
nsenter.1 nsenter: Allow selecting the uid and gid to be used in the entered userns 2013-06-18 10:35:44 +02:00
nsenter.c nsenter: Allow selecting the uid and gid to be used in the entered userns 2013-06-18 10:35:44 +02:00
pivot_root.8 docs: mention long options in pivot_root.8 2011-09-17 14:25:20 +02:00
pivot_root.c sys-utils: verify writing to streams was successful 2012-04-04 19:49:40 +02:00
prlimit.1 prlimit: s/amount/number/ 2011-11-23 12:52:36 +01:00
prlimit.c prlimit: delete rem_prlim prototype 2013-05-06 19:27:03 +02:00
readprofile.8 readprofile: reorder options in man page 2013-04-05 13:16:02 +02:00
readprofile.c readprofile: fix --reest (--reset) typo 2013-03-04 12:25:47 +01:00
renice.1 textual: standardize the spelling of "superuser" 2013-06-07 11:31:37 +02:00
renice.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
rtcwake.8 rtcwake: add support for "freeze" mode 2013-04-23 13:20:15 +02:00
rtcwake.c rtcwake: pass -h to shutdown 2013-04-25 09:23:40 +02:00
setarch.8 setarch: add option to list settable architectures 2013-04-05 14:03:07 +02:00
setarch.c setarch: clean up usage() 2013-04-09 12:17:05 +02:00
setpriv.1 standard SEE ALSO section of man pages 2013-05-13 14:42:59 +02:00
setpriv.c setpriv: check writing to a file descriptor was successful 2013-04-26 13:26:07 +02:00
setsid.1 setsid: add option "-c" to set the controlling terminal 2012-03-20 09:22:54 +01:00
setsid.c setsid: exit when control terminal cannot be set 2013-04-26 13:26:01 +02:00
swapoff.8 build-sys: move swapon from mount/ to sys-utils/ 2012-01-11 12:14:29 +01:00
swapoff.c swapoff: cleanup usage() and includes 2012-04-18 12:38:03 +02:00
swapon-common.c swapoff: use libmount to parse fstab 2012-04-18 12:22:11 +02:00
swapon-common.h swapon: move generic code to swapon-common.c 2012-04-18 11:21:12 +02:00
swapon.8 docs: remove repeated words 2013-04-05 13:35:30 +02:00
swapon.c swapon: check writing to a file descriptor was successful 2013-04-26 13:26:07 +02:00
switch_root.8 standard SEE ALSO section of man pages 2013-05-13 14:42:59 +02:00
switch_root.c switch_root: Add a sanity check 2013-02-13 14:55:30 +01:00
tunelp.8 docs: align tunelp.8 with howto-man-page.txt 2011-11-02 18:41:56 +01:00
tunelp.c textual: spell and encode the name of Arkadiusz Miśkiewicz correctly 2013-02-06 11:15:02 +01:00
umount.8 umount: add note about namespaces too --all-targets 2013-02-27 11:23:33 +01:00
umount.c libmount: be robust for empty target/source strings 2013-06-17 13:02:15 +02:00
unshare.1 Fix broken list syntax. 2013-06-10 17:51:31 -04:00
unshare.c unshare: tweak style 2013-03-04 12:28:37 +01:00
wdctl.8 wdctl: tiny change to man page 2012-08-02 19:25:00 +02:00
wdctl.c wdctl: check writing to a file descriptor was successful 2013-04-26 13:26:06 +02:00