Re: What variables are important when a cdrom is in or out?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/7/21 Kay Sievers <kay.sievers@xxxxxxxx>:
> On Tue, Jul 20, 2010 at 23:36, Stef Bon <stefbon@xxxxxxxxx> wrote:

>>
>> I see the variables ID_FS_*** are set. I can make my scripts look at
>> these to determine the cdrom is in or out.
>> Is this ok? Or do I have to check the  parameter ID_CDROM_MEDIA=1? Or
>> something else?
>
> It's ID_CDROM_MEDIA=1 for any media.
>
> If you want to access the raw disk, you want
> ID_CDROM_MEDIA_TRACK_COUNT_DATA=?*, because real CD Audio CDs must not
> be accessed like a filesystem, or probed for one.
>
> ID_FS_* might not be set, if there is an unknown data format on it.

So, it's the parameter ID_CDROM_MEDIA. That's simple. Thanks a lot!

Futher, if there is an filesystem which is reckognized, the ID_FS_*
parameters are set.

I've inserted a audio cd, and indeed I get the
ID_CDROM_MEDIA_TRACK_COUNT equal to 18,
and ID_CDROM_MEDIA_TRACK_COUNT_AUDIO also 18. Does this mean that
there is also an
ID_CDROM_MEDIA_TRACK_COUNT_VIDEO??

And what's the meaning of the ID_CDROM_MEDIA_SESSION_COUNT? Multisession cd's?

Stef
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux