From: "Matthias Schwarzott (zzam)" <zzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [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
Date: Sun, 03 Aug 2008 11:45:46 +0000 [thread overview]
Message-ID: <E1KPc1y-00014k-GJ@stork.gentoo.org> (raw)
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"
reply other threads:[~2008-08-03 11:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KPc1y-00014k-GJ@stork.gentoo.org \
--to=zzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox