Messages in this thread | | | Date | Mon, 13 Sep 1999 22:11:32 +0200 | From | Peter Palfrader aka Weasel <> | Subject | Re: vmware |
| |
> > Linux 2.2.12 doesn't seem to lock my cdrom drive door when mounted.
Perhaps you remember, I reported the same problem in <377EA183.E352BB69@writeme.com> Subject: ejecting a mounted CD (linux 2.2.10; vmware 1.02) about two months ago.
I had some contact with Jens Axboe <axboe@image.dk> and also with vmware. vmware does not seem very interested in this bug but anyway I finally found out that:
In an email to Jens I wrote: <...> > So I looked at the CDROM_SET_OPTIONS and CDROM_CLEAR_OPTIONS calls that > occur during the vmware startup and found the following: > CDROM_SET_OPTIONS with an argument of 0 so nothing changes and a > CDROM_CLEAR_OPTIONS with an argument of 9 which clears the > CDO_AUTO_CLOSE and the CDO_LOCK in cdi->options. > > Unfortunatly this is not reset after quitting vmware.
This little c program helps me alot (note: this might be the worst c you've ever seen, but it helps :) std disclaimer applies
#include <sys/ioctl.h> #include <sys/types.h> #include <fcntl.h> #include <linux/cdrom.h> #include <stdio.h> #include <errno.h>
int main() {
int cdrom;
cdrom = open("/dev/scd0", O_RDONLY | O_NONBLOCK); printf("%d; %s\n", cdrom, strerror(errno)); ioctl(cdrom, CDROM_CLEAR_OPTIONS, CDO_AUTO_EJECT | CDO_CHECK_TYPE); ioctl(cdrom, CDROM_SET_OPTIONS, CDO_AUTO_CLOSE | CDO_USE_FFLAGS | CDO_LOCK);
printf("%s\n", strerror(errno)); close(cdrom); };
-- Weasel http://www.cosy.sbg.ac.at/~ppalfrad/ PGP encrypted messages prefered. See my site or finger -l ppalfrad ------------------------------------------------------------------- A friend is someone who knows the song in your heart and can sing it back to you when you have forgotten the words. [unhandled content-type:application/pgp-signature]
| |