lkml.org 
[lkml]   [1999]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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]
\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.141 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site