CDROM question
Bruce Dawson
jbd at codemeta.com
Mon Aug 9 16:30:01 EDT 2004
On Mon, 2004-08-09 at 15:54, Cole Tuininga wrote:
>
> Random question for y'all - does anybody know of a common and relatively
> simple way to determine:
> ...
> B) If there is a disc in the drive?
If /proc/ide/hdb/capacity contains a non-zero number, then there's a CD
in the drive. (Assuming you have a cd drive at /dev/hdb). This appears
to work for both audio and data cdroms.
--Bruce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040809/c9caf957/attachment.bin
More information about the gnhlug-discuss
mailing list