On Tue, Apr 21, 2009 at 09:25, Martin Pitt <email address hidden> wrote:
> However, this rule (and the corresponding code in cdrom_id [1]) relies
> on the track/session counts being zero if there is no CD in the drive.
> However, at least with kernel 2.6.28.8 the affected people get
> something like
>
> ID_CDROM_MEDIA_STATE=blank
> ID_CDROM_MEDIA_SESSION_NEXT=2894
> ID_CDROM_MEDIA_SESSION_COUNT=19194
> ID_CDROM_MEDIA_TRACK_COUNT=47323
>
> In other words, if ID_CDROM_MEDIA_STATE=blank, the session/track
> counts are not reliable.
Nice hardware! :)
> Arguably this could/should be fixed in the kernel, to fix these values
> to 0 if there is no CD in the drive, or it is blank. However, I
> wondered if the udev rules should be more robust in that regard, and
> not even ask for the number of tracks if there is no/empty CD.
> Affected people verified that adding this rule before the one from
> above makes things work:
>
> KERNEL=="sr*", ENV{ID_CDROM_MEDIA_STATE}=="blank", GOTO="persistent_storage_end"
The problem is that there are other devices which report a blank media
for non-blank ones, so this rule would break these.
On Tue, Apr 21, 2009 at 09:25, Martin Pitt <email address hidden> wrote: MEDIA_STATE= blank MEDIA_SESSION_ NEXT=2894 MEDIA_SESSION_ COUNT=19194 MEDIA_TRACK_ COUNT=47323 MEDIA_STATE= blank, the session/track
> However, this rule (and the corresponding code in cdrom_id [1]) relies
> on the track/session counts being zero if there is no CD in the drive.
> However, at least with kernel 2.6.28.8 the affected people get
> something like
>
> ID_CDROM_
> ID_CDROM_
> ID_CDROM_
> ID_CDROM_
>
> In other words, if ID_CDROM_
> counts are not reliable.
Nice hardware! :)
> Arguably this could/should be fixed in the kernel, to fix these values CDROM_MEDIA_ STATE}= ="blank" , GOTO="persisten t_storage_ end"
> to 0 if there is no CD in the drive, or it is blank. However, I
> wondered if the udev rules should be more robust in that regard, and
> not even ask for the number of tracks if there is no/empty CD.
> Affected people verified that adding this rule before the one from
> above makes things work:
>
> KERNEL=="sr*", ENV{ID_
The problem is that there are other devices which report a blank media
for non-blank ones, so this rule would break these.
We changed it yesterday to use an ID_CDROM_MEDIA key: git.kernel. org/?p= linux/hotplug/ udev.git; a=commit; h=f907449eee3f5 8fafafee0658e80 578b1dbb2722
http://
Would be good to know, if that works in the case you see the wrong values.
Thanks,
Kay