Linux Hotplug development
 help / color / mirror / Atom feed
* What variables are important when a cdrom is in or out?
@ 2010-07-20 21:36 Stef Bon
  2010-07-20 22:03 ` Kay Sievers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stef Bon @ 2010-07-20 21:36 UTC (permalink / raw)
  To: linux-hotplug

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Í
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Í
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-21 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 21:36 What variables are important when a cdrom is in or out? Stef Bon
2010-07-20 22:03 ` Kay Sievers
2010-07-20 22:25 ` Stef Bon
2010-07-21  6:38 ` Kay Sievers
2010-07-21 21:02 ` Matthew Dharm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox