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

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

 



Hello,

I would like to know what variable is THE variable to point a cdrom is
in the drive or not.

I've made a udev rule to output all the variables set when a media change.

Now look when a drive is ejected. The output:


ID_BUS=scsi
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_MODEL=DVD_RW_AD-7170S
ID_MODEL_ENC='DVD\x20RW\x20AD-7170S\x20'
ID_PATH=pci-0000:00:1f.2-scsi-1:0:0:0
ID_REVISION=1.00
ID_SCSI=1
ID_TYPE=cd
ID_VENDOR=Optiarc
ID_VENDOR_ENC='Optiarc\x20'

When it's inserted again:


ID_BUS=scsi
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD_R=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_FS_LABEL=openSUSE-NET-i586-Build0475..001
ID_FS_LABEL_ENC=openSUSE-NET-i586-Build0475..001
ID_FS_TYPE=iso9660
ID_FS_USAGE=filesystem
ID_MODEL=DVD_RW_AD-7170S
ID_MODEL_ENC='DVD\x20RW\x20AD-7170S\x20'
ID_PATH=pci-0000:00:1f.2-scsi-1:0:0:0
ID_REVISION=1.00
ID_SCSI=1
ID_TYPE=cd
ID_VENDOR=Optiarc
ID_VENDOR_ENC='Optiarc\x20'


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?

Stef Bon
--
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