Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
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:49
Message-Id: E1KPc1y-00014k-GJ@stork.gentoo.org
1 zzam 08/08/03 11:45:46
2
3 Added: udev-125-cdrom-autoclose-bug.diff
4 udev-125-rules-update.diff
5 udev-124-cdrom-autoclose-bug.diff
6 Log:
7 Backported fix for cdrom autoclosing when ejecting the media. Cleaned up udev-125 rules update patch.
8 (Portage version: 2.2_rc6/cvs/Linux 2.6.25-tuxonice-r6 i686)
9
10 Revision Changes Path
11 1.1 sys-fs/udev/files/udev-125-cdrom-autoclose-bug.diff
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-cdrom-autoclose-bug.diff?rev=1.1&view=markup
14 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
15
16 Index: udev-125-cdrom-autoclose-bug.diff
17 ===================================================================
18 commit f755fd5657b619fd27160ad202fc5d773d096e9c
19 Author: Kay Sievers <kay.sievers@××××.org>
20 Date: Sat Aug 2 10:26:48 2008 +0200
21
22 rules: run vol_id on opticals only if media is found
23
24 Opening an optical drive device node without O_NONBLOCK autocloses the
25 tray, we run vol_id on every media change by kernel emitted "change"
26 events, which can make it hard to change the media when the tray closes
27 immediatey again.:) We check for cdrom_id to indicate an existing track,
28 if no media is found, we will not open the device with vol_id.
29
30 Thanks to Christian Krause and DavidZ for debugging and testing.
31
32 diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
33 index 5ae0c7f..097e864 100644
34 --- a/rules/rules.d/60-persistent-storage.rules
35 +++ b/rules/rules.d/60-persistent-storage.rules
36 @@ -52,6 +52,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
37
38 # skip unpartitioned removable media devices from drivers which do not send "change" events
39 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
40 +# skip optical drives without media
41 +ENV{DEVTYPE}=="disk", KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end"
42
43 # import filesystem metadata
44 IMPORT{program}="vol_id --export $tempnode"
45
46
47
48 1.1 sys-fs/udev/files/udev-125-rules-update.diff
49
50 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-125-rules-update.diff?rev=1.1&view=markup
51 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
52
53 Index: udev-125-rules-update.diff
54 ===================================================================
55 Index: udev-git/rules/gentoo/65-permissions.rules
56 ===================================================================
57 --- udev-git.orig/rules/gentoo/65-permissions.rules
58 +++ udev-git/rules/gentoo/65-permissions.rules
59 @@ -15,7 +15,7 @@ KERNEL=="st[0-9]*|nst[0-9]*|ht[0-9]*|nht
60 SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="[18]", GROUP="tape", MODE="660"
61
62 # dialout devices
63 -KERNEL=="ippp*|isdn*|dcbri*|capi*", GROUP="uucp"
64 +KERNEL=="ippp*|isdn*|dcbri*|capi*|rfcomm*|ttyACM[0-9]*", GROUP="uucp"
65 KERNEL=="pilot", GROUP="uucp"
66
67 # sound devices (sound=alsa, snd=oss)
68
69
70
71 1.1 sys-fs/udev/files/udev-124-cdrom-autoclose-bug.diff
72
73 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/udev-124-cdrom-autoclose-bug.diff?rev=1.1&view=markup
74 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
75
76 Index: udev-124-cdrom-autoclose-bug.diff
77 ===================================================================
78 commit f755fd5657b619fd27160ad202fc5d773d096e9c
79 Author: Kay Sievers <kay.sievers@××××.org>
80 Date: Sat Aug 2 10:26:48 2008 +0200
81
82 rules: run vol_id on opticals only if media is found
83
84 Opening an optical drive device node without O_NONBLOCK autocloses the
85 tray, we run vol_id on every media change by kernel emitted "change"
86 events, which can make it hard to change the media when the tray closes
87 immediatey again.:) We check for cdrom_id to indicate an existing track,
88 if no media is found, we will not open the device with vol_id.
89
90 Thanks to Christian Krause and DavidZ for debugging and testing.
91
92 diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules
93 index 5ae0c7f..097e864 100644
94 --- a/etc/udev/rules.d/60-persistent-storage.rules
95 +++ b/etc/udev/rules.d/60-persistent-storage.rules
96 @@ -52,6 +52,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
97
98 # skip unpartitioned removable media devices from drivers which do not send "change" events
99 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
100 +# skip optical drives without media
101 +ENV{DEVTYPE}=="disk", KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="persistent_storage_end"
102
103 # import filesystem metadata
104 IMPORT{program}="vol_id --export $tempnode"