diff options
author | Karel Zak | 2012-03-27 17:53:00 +0200 |
---|---|---|
committer | Karel Zak | 2012-03-27 17:53:00 +0200 |
commit | a3ae330139831c31534226397c9403caa00f5648 (patch) | |
tree | 579dddec36e11e6b5ce1d3b37675ec866e3c1830 /misc-utils/eject.c | |
parent | eject: new close_tray code from Fedora (diff) | |
download | kernel-qcow2-util-linux-a3ae330139831c31534226397c9403caa00f5648.tar.gz kernel-qcow2-util-linux-a3ae330139831c31534226397c9403caa00f5648.tar.xz kernel-qcow2-util-linux-a3ae330139831c31534226397c9403caa00f5648.zip |
eject: support CDIOCEJECT ioctl
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/eject.c')
-rw-r--r-- | misc-utils/eject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc-utils/eject.c b/misc-utils/eject.c index acea2a295..402dfe4a2 100644 --- a/misc-utils/eject.c +++ b/misc-utils/eject.c @@ -527,7 +527,13 @@ static void list_speeds(const char *name, int fd) */ static int eject_cdrom(int fd) { +#if defined(CDROMEJECT) return ioctl(fd, CDROMEJECT) == 0; +#elif defined(CDIOCEJECT) + return ioctl(fd, CDIOCEJECT) == 0; +#else + warnx(_("CD-ROM eject unsupported")); +#endif } /* |