cdcontrol -f /cdrom eject

From: Ulrich Spoerlein <spoerlein_at_informatik.uni-wuerzburg.de>
Date: Sun, 14 May 2006 19:47:18 +0200
Hello everybody,

I tried to make 'cdcontrol -f /mountpoint eject' work, but I found
something strange while implementing it.

First of all, cdcontrol will eject the media, even if it is currently
mounted. Shouldn't mount lock the media, and only unmount unlock it?

To reproduce

% mount /cdrom
% mount|grep acd0
% cdcontrol -f /dev/acd0 eject                  # works
% mount|grep acd0                               # still mounted

Attached is a patch that will umount the given mount-point first, then
eject the media. I wonder why the CDIOCALLOW is necessary even if the
media was not previously mounted. It only seems to make a difference
with cd(4), acd(4) will eject the media even without the CDIOCALLOW
call. Very strange (at least to me), or it might be bad atapicam-mojo
that's interfering.

Anyway, comments are appreciated!

Ulrich Spoerlein
-- 
 PGP Key ID: 20FEE9DD				Encrypted mail welcome!
Fingerprint: AEC9 AF5E 01AC 4EE1 8F70  6CBD E76E 2227 20FE E9DD
Which is worse: ignorance or apathy?
Don't know. Don't care.

Received on Sun May 14 2006 - 16:47:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:55 UTC