Re: vmware

Peter Palfrader aka Weasel (palfrader@writeme.com)
Mon, 13 Sep 1999 22:11:32 +0200


--61jdw2sOBCFtR2d/
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

> > 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.=20

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:=20

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.
>=20
> 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 =3D open("/dev/scd0", O_RDONLY | O_NONBLOCK);
printf("%d; %s\n", cdrom, strerror(errno));
=20
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);
};

--=20
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.

--61jdw2sOBCFtR2d/
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBN91adL/AUNfRo6MpAQEJ3gP+L9CiQIIziraN/0JM4CuSfzMS+1t7QUmf
uxmU+0zmhr0ENhzJ40aF4fgvN0rvMlCpyg/Je0flNwHmDZxZvkpw0+Uvad5MqI9r
f0dVIVdl33+xbAF9uO804Smbwh2Pqh2vexL1OSo3S1xTAnNUKBaH6YXj0Tjfhgqk
Ayk3sgYMolk=
=FQTO
-----END PGP SIGNATURE-----

--61jdw2sOBCFtR2d/--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/