From a3ae330139831c31534226397c9403caa00f5648 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Mar 2012 17:53:00 +0200 Subject: [PATCH] eject: support CDIOCEJECT ioctl Signed-off-by: Karel Zak --- misc-utils/eject.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 } /* -- 2.47.3