]> git.ipfire.org Git - thirdparty/util-linux.git/commit
eject: inform if CD-ROM drive is not ready
authorSami Kerola <kerolasa@iki.fi>
Sun, 10 Jun 2012 20:03:57 +0000 (22:03 +0200)
committerSami Kerola <kerolasa@iki.fi>
Mon, 11 Jun 2012 20:06:05 +0000 (22:06 +0200)
commitf31d041aaf0d63442b8c166f9be3eea5cb608f63
tree48e82a2a335b79cc1d5649b2dac73f251f9db88d
parent957a3eede931d864b2c8e1fff0f06fc5ece46143
eject: inform if CD-ROM drive is not ready

Include file (see linux/cdrom.h lines 395 and 398) suggests ioctl() can
return CDS_NO_INFO and CDS_DRIVE_NOT_READY, which where ignored.  This
commit will tell user what is going on.

The commit will also make eject to crash in ioctl() will return
unexpected value.

Reference: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/linux/cdrom.h;h=dfd7f187c351440d2ffa81050e46ed2602877f73;hb=HEAD
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/eject.c