diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-28 16:42:40 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-28 16:42:40 +0000 |
commit | 6a9076129c48496af1f17905d53f15427aa5e341 (patch) | |
tree | 1146e92c215862e3cfbac7d2bc39b13cab81976f | |
parent | 1a37fd3b14680f6890102bf0e3ff4498a7443362 (diff) | |
download | drakx-6a9076129c48496af1f17905d53f15427aa5e341.tar drakx-6a9076129c48496af1f17905d53f15427aa5e341.tar.gz drakx-6a9076129c48496af1f17905d53f15427aa5e341.tar.bz2 drakx-6a9076129c48496af1f17905d53f15427aa5e341.tar.xz drakx-6a9076129c48496af1f17905d53f15427aa5e341.zip |
we still can't eject. try to shotgun a bit.
-rw-r--r-- | mdk-stage1/init.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index 73e82bd7d..5209f1f50 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -336,9 +336,26 @@ void unmount_filesystems(void) fd = open("/dev/cdrom", O_RDONLY|O_NONBLOCK, 0); if (fd > 0) { ioctl(fd, CDROM_LOCKDOOR, 0); + close(fd); + } + fd = open("/dev/cdrom", O_RDONLY|O_NONBLOCK, 0); + if (fd > 0) { + if (!ioctl(fd, CDROMEJECT, 0)) + goto ejected; + close(fd); + } + fd = open("/dev/cdrom", O_RDONLY|O_NONBLOCK, 0); + if (fd > 0) { + ioctl(fd, CDROM_LOCKDOOR, 0); + close(fd); + } + fd = open("/dev/cdrom", O_RDONLY|O_NONBLOCK, 0); + if (fd > 0) { ioctl(fd, CDROMEJECT, 0); close(fd); } + ejected: + close(fd); } #endif |