* [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files: udev-125-cdrom-autoclose-bug.diff udev-125-rules-update.diff udev-124-cdrom-autoclose-bug.diff
@ 2008-08-03 11:45 Matthias Schwarzott (zzam)
0 siblings, 0 replies; only message in thread
From: Matthias Schwarzott (zzam) @ 2008-08-03 11:45 UTC (permalink / raw
To: gentoo-commits
zzam 08/08/03 11:45:46
Added: udev-125-cdrom-autoclose-bug.diff
udev-125-rules-update.diff
udev-124-cdrom-autoclose-bug.diff
Log:
Backported fix for cdrom autoclosing when ejecting the media. Cleaned up udev-125 rules update patch.
(Portage version: 2.2_rc6/cvs/Linux 2.6.25-tuxonice-r6 i686)
Revision Changes Path
1.1 sys-fs/udev/files/udev-125-cdrom-autoclose-bug.diff
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-cdrom-autoclose-bug.diff?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-cdrom-autoclose-bug.diff?rev=1.1&content-type=text/plain
Index: udev-125-cdrom-autoclose-bug.diff
===================================================================
commit f755fd5657b619fd27160ad202fc5d773d096e9c
Author: Kay Sievers <kay.sievers@vrfy.org>
Date: Sat Aug 2 10:26:48 2008 +0200
rules: run vol_id on opticals only if media is found
Opening an optical drive device node without O_NONBLOCK autocloses the
tray, we run vol_id on every media change by kernel emitted "change"
events, which can make it hard to change the media when the tray closes
immediatey again.:) We check for cdrom_id to indicate an existing track,
if no media is found, we will not open the device with vol_id.
Thanks to Christian Krause and DavidZ for debugging and testing.
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index 5ae0c7f..097e864 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -52,6 +52,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
# skip unpartitioned removable media devices from drivers which do not send "change" events
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
+# skip optical drives without media
+ENV{DEVTYPE}=="disk", KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end"
# import filesystem metadata
IMPORT{program}="vol_id --export $tempnode"
1.1 sys-fs/udev/files/udev-125-rules-update.diff
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-rules-update.diff?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-rules-update.diff?rev=1.1&content-type=text/plain
Index: udev-125-rules-update.diff
===================================================================
Index: udev-git/rules/gentoo/65-permissions.rules
===================================================================
--- udev-git.orig/rules/gentoo/65-permissions.rules
+++ udev-git/rules/gentoo/65-permissions.rules
@@ -15,7 +15,7 @@ KERNEL=="st[0-9]*|nst[0-9]*|ht[0-9]*|nht
SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE="660"
# dialout devices
-KERNEL=="ippp*|isdn*|dcbri*|capi*", GROUP="uucp"
+KERNEL=="ippp*|isdn*|dcbri*|capi*|rfcomm*|ttyACM[0-9]*", GROUP="uucp"
KERNEL=="pilot", GROUP="uucp"
# sound devices (sound=alsa, snd=oss)
1.1 sys-fs/udev/files/udev-124-cdrom-autoclose-bug.diff
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-124-cdrom-autoclose-bug.diff?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-124-cdrom-autoclose-bug.diff?rev=1.1&content-type=text/plain
Index: udev-124-cdrom-autoclose-bug.diff
===================================================================
commit f755fd5657b619fd27160ad202fc5d773d096e9c
Author: Kay Sievers <kay.sievers@vrfy.org>
Date: Sat Aug 2 10:26:48 2008 +0200
rules: run vol_id on opticals only if media is found
Opening an optical drive device node without O_NONBLOCK autocloses the
tray, we run vol_id on every media change by kernel emitted "change"
events, which can make it hard to change the media when the tray closes
immediatey again.:) We check for cdrom_id to indicate an existing track,
if no media is found, we will not open the device with vol_id.
Thanks to Christian Krause and DavidZ for debugging and testing.
diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules
index 5ae0c7f..097e864 100644
--- a/etc/udev/rules.d/60-persistent-storage.rules
+++ b/etc/udev/rules.d/60-persistent-storage.rules
@@ -52,6 +52,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
# skip unpartitioned removable media devices from drivers which do not send "change" events
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
+# skip optical drives without media
+ENV{DEVTYPE}=="disk", KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end"
# import filesystem metadata
IMPORT{program}="vol_id --export $tempnode"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-03 11:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 11:45 [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files: udev-125-cdrom-autoclose-bug.diff udev-125-rules-update.diff udev-124-cdrom-autoclose-bug.diff Matthias Schwarzott (zzam)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox