From: Karel Zak Date: Tue, 27 Mar 2012 15:53:00 +0000 (+0200) Subject: eject: support CDIOCEJECT ioctl X-Git-Tag: v2.22-rc1~555^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3ae330139831c31534226397c9403caa00f5648;p=thirdparty%2Futil-linux.git eject: support CDIOCEJECT ioctl Signed-off-by: Karel Zak --- diff --git a/misc-utils/eject.c b/misc-utils/eject.c index acea2a295c..402dfe4a23 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 } /*