Compare commits

...
Sign in to create a new pull request.

12 commits

Author SHA1 Message Date
Daniel Drake
ec910abb26 Update OLPC XO keymap
and fix compile with new headers
2011-08-29 14:12:51 +01:00
Harald Hoyer
fb822cc791 - add ACLs for harmony remote controls
Resolves: rhbz#559412
    - fixed CDROM profile handling
2011-03-23 13:43:53 +01:00
Bastien Nocera
6fb9523562 - Add patches to fix touchpad toggle key handling 2010-11-25 16:05:55 +00:00
Harald Hoyer
fbdc9f8abf - fix /dev/systty
Resolves: rhbz#654935
2010-11-19 09:11:48 +01:00
Harald Hoyer
635a57578d - add ACLs for PDA devices
Resolves: rhbz#642435
2010-11-12 15:48:26 +01:00
Harald Hoyer
b50bf3157e - enlarged the import buffer to fix the ressize bugs
Resolves: rhbz#652318
2010-11-12 15:27:34 +01:00
Harald Hoyer
e31ef1c264 - more cdrom_id patches
Resolves: rhbz#637495
2010-10-07 18:02:10 +02:00
Harald Hoyer
e61860db45 - add cdrom_id patch for pre-MMC2 drives, which do not report
profiles
Resolves: rhbz#637495
2010-10-05 17:11:39 +02:00
Harald Hoyer
b50b37d1d1 - bugfixes for systemd service files
- bugfix for selinux labeling
- bugfixes for cdrom_id
2010-09-01 11:24:28 +02:00
Harald Hoyer
b1f83ec4d2 - udev-161 with an upstream quirk for the qemu cdrom and
more cdrom handling bugfixes
Resolves: rhbz#609049 rhbz#624286
- added floppy group
Resolves: rhbz#620814
2010-08-17 11:37:36 +02:00
Harald Hoyer
c20f18b85c udev-post.init: change trigger event to "add" 2010-08-13 10:33:49 +02:00
Harald Hoyer
a866928386 * Fri Aug 06 2010 Harald Hoyer <harald@redhat.com> 160-9
- added quirk to cdrom_id, to boot from qemu
Resolves: rhbz#609049
2010-08-06 18:41:59 +02:00
44 changed files with 2271 additions and 6 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
udev-160.tar.bz2
udev-161.tar.bz2.sign
udev-161.tar.bz2

View file

@ -0,0 +1,232 @@
From a1ca5f60e0770299c5c5f21bd371f5823802412b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 4 Nov 2010 23:58:56 +0000
Subject: [PATCH] extras/keymap: Make touchpad buttons consistent
We'll need to standardise on the Touchpad related keys in udev, kernel, and
X.org. I selected F21 for XF86TouchpadToggle, F22 for XF86TouchpadOn and F23
for XF86TouchpadOff.
See:
https://bugs.freedesktop.org/show_bug.cgi?id=31333
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
extras/keymap/keymaps/acer | 2 +-
extras/keymap/keymaps/dell | 4 ++--
extras/keymap/keymaps/everex-xt5000 | 2 +-
extras/keymap/keymaps/hewlett-packard-2510p_2530p | 4 ++--
extras/keymap/keymaps/hewlett-packard-pavilion | 4 ++--
extras/keymap/keymaps/hewlett-packard-tx2 | 2 +-
.../lenovo-thinkpad-usb-keyboard-trackpoint | 2 +-
extras/keymap/keymaps/lg-x110 | 4 ++--
extras/keymap/keymaps/micro-star | 2 +-
extras/keymap/keymaps/module-lenovo | 2 +-
extras/keymap/keymaps/onkyo | 2 +-
extras/keymap/keymaps/samsung-other | 2 +-
extras/keymap/keymaps/samsung-sx20s | 4 ++--
extras/keymap/keymaps/toshiba-satellite_a110 | 4 ++--
extras/keymap/keymaps/toshiba-satellite_m30x | 4 ++--
extras/keymap/keymaps/zepto-znote | 2 +-
16 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/extras/keymap/keymaps/acer b/extras/keymap/keymaps/acer
index 6abe39c..4e7c297 100644
--- a/extras/keymap/keymaps/acer
+++ b/extras/keymap/keymaps/acer
@@ -14,7 +14,7 @@
0xEE brightnessup # Fn+Right
0xEF brightnessdown # Fn+Left
0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on)
-0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off)
+0xF2 f23 # Fn+F7 Touchpad toggle (on-to-off)
0xF3 prog2 # "P2" programmable button
0xF4 prog1 # "P1" programmable button
0xF5 presentation
diff --git a/extras/keymap/keymaps/dell b/extras/keymap/keymaps/dell
index 1a2e433..fbbb903 100644
--- a/extras/keymap/keymaps/dell
+++ b/extras/keymap/keymaps/dell
@@ -21,9 +21,9 @@
0x99 nextsong # Front panel next song
0x9A setup # Tablet tools button
0x9B switchvideomode # Display Toggle button
-0x9E f22 #touchpad toggle
+0x9E f21 #touchpad toggle
0xA2 playpause # Front panel play/pause
0xA4 stopcd # Front panel stop
0xED media # MediaDirect button
0xD8 screenlock # FIXME: Tablet lock button
-0xD9 f22 # touchpad toggle
+0xD9 f21 # touchpad toggle
diff --git a/extras/keymap/keymaps/everex-xt5000 b/extras/keymap/keymaps/everex-xt5000
index 53bdd7a..4823a83 100644
--- a/extras/keymap/keymaps/everex-xt5000
+++ b/extras/keymap/keymaps/everex-xt5000
@@ -1,5 +1,5 @@
0x5C media
-0x65 f22 # Fn+F5 Touchpad toggle
+0x65 f21 # Fn+F5 Touchpad toggle
0x67 prog3 # Fan Speed Control button
0x6F brightnessup
0x7F brightnessdown
diff --git a/extras/keymap/keymaps/hewlett-packard-2510p_2530p b/extras/keymap/keymaps/hewlett-packard-2510p_2530p
index 2bc70c2..41ad2e9 100644
--- a/extras/keymap/keymaps/hewlett-packard-2510p_2530p
+++ b/extras/keymap/keymaps/hewlett-packard-2510p_2530p
@@ -1,2 +1,2 @@
-0xD8 f22 # touchpad off
-0xD9 f23 # touchpad on
+0xD8 f23 # touchpad off
+0xD9 f22 # touchpad on
diff --git a/extras/keymap/keymaps/hewlett-packard-pavilion b/extras/keymap/keymaps/hewlett-packard-pavilion
index a55d2b7..3d3cefc 100644
--- a/extras/keymap/keymaps/hewlett-packard-pavilion
+++ b/extras/keymap/keymaps/hewlett-packard-pavilion
@@ -1,3 +1,3 @@
0x88 media # FIXME: quick play
-0xD8 f22 # touchpad off
-0xD9 f23 # touchpad on
+0xD8 f23 # touchpad off
+0xD9 f22 # touchpad on
diff --git a/extras/keymap/keymaps/hewlett-packard-tx2 b/extras/keymap/keymaps/hewlett-packard-tx2
index 206c004..36a690f 100644
--- a/extras/keymap/keymaps/hewlett-packard-tx2
+++ b/extras/keymap/keymaps/hewlett-packard-tx2
@@ -1,3 +1,3 @@
0xC2 media
-0xD8 f22 # Toggle touchpad button on tx2 (OFF)
+0xD8 f23 # Toggle touchpad button on tx2 (OFF)
0xD9 f22 # Toggle touchpad button on tx2 (ON)
diff --git a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint
index 7612f79..bc91470 100644
--- a/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint
+++ b/extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint
@@ -2,7 +2,7 @@
0x90013 battery # Fn+F3
0x90014 wlan # Fn+F5
0x90016 switchvideomode # Fn+F7
-0x90017 f22 # Fn+F8 touchpadtoggle
+0x90017 f21 # Fn+F8 touchpadtoggle
0x90019 suspend # Fn+F12
0x9001A brightnessup # Fn+Home
0x9001B brightnessdown # Fn+End
diff --git a/extras/keymap/keymaps/lg-x110 b/extras/keymap/keymaps/lg-x110
index a61cf3d..ba08cba 100644
--- a/extras/keymap/keymaps/lg-x110
+++ b/extras/keymap/keymaps/lg-x110
@@ -6,7 +6,7 @@
0xB3 suspend # Fn-F12
0xDF sleep # Fn-F4
# 0xE2 bluetooth # satellite dish2
-0xE4 f22 # Fn-F5 Touchpad disable
+0xE4 f21 # Fn-F5 Touchpad disable
0xF6 wlan # Fn-F6
0xF7 reserved # brightnessdown # Fn-Down
-0xF8 reserved # brightnessup # Fn-Up
\ No newline at end of file
+0xF8 reserved # brightnessup # Fn-Up
diff --git a/extras/keymap/keymaps/micro-star b/extras/keymap/keymaps/micro-star
index 0de5ae6..4a43869 100644
--- a/extras/keymap/keymaps/micro-star
+++ b/extras/keymap/keymaps/micro-star
@@ -4,7 +4,7 @@
0xB2 www # e button
0xDF sleep # Fn-F12
0xE2 bluetooth # satellite dish2
-0xE4 f22 # Fn-F3 Touchpad disable
+0xE4 f21 # Fn-F3 Touchpad disable
0xEC email # envelope button
0xEE camera # Fn-F6 camera disable
0xF6 wlan # satellite dish1
diff --git a/extras/keymap/keymaps/module-lenovo b/extras/keymap/keymaps/module-lenovo
index 7c597bd..9cb74b2 100644
--- a/extras/keymap/keymaps/module-lenovo
+++ b/extras/keymap/keymaps/module-lenovo
@@ -3,7 +3,7 @@
0x3 sleep # Fn+F4
0x4 wlan # Fn+F5
0x6 switchvideomode # Fn+F7
-0x7 f22 # Fn+F8 touchpadtoggle
+0x7 f21 # Fn+F8 touchpadtoggle
0x8 f24 # Fn+F9 undock
0xB suspend # Fn+F12
0xF brightnessup # Fn+Home
diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo
index 7dd80a1..ee864ad 100644
--- a/extras/keymap/keymaps/onkyo
+++ b/extras/keymap/keymaps/onkyo
@@ -8,7 +8,7 @@
0xF0 media # Fn+R
0xF5 switchvideomode # Fn+E
0xF6 camera # Fn+T
-0xF7 f22 # Fn+Y (touchpad toggle)
+0xF7 f21 # Fn+Y (touchpad toggle)
0xF8 brightnessup # Fn+S
0xF9 brightnessdown # Fn+A
0xFB wlan # Fn+J
diff --git a/extras/keymap/keymaps/samsung-other b/extras/keymap/keymaps/samsung-other
index 6a0928c..3ac0c2f 100644
--- a/extras/keymap/keymaps/samsung-other
+++ b/extras/keymap/keymaps/samsung-other
@@ -11,4 +11,4 @@
0xB3 prog3 # Fn+F8 switch power mode (battery/dynamic/performance)
0xB4 wlan # Fn+F9 (X60P)
0xF7 f22 # Fn+F10 Touchpad on
-0xF9 f22 # Fn+F10 Touchpad off
+0xF9 f23 # Fn+F10 Touchpad off
diff --git a/extras/keymap/keymaps/samsung-sx20s b/extras/keymap/keymaps/samsung-sx20s
index daf7d3e..9d954ee 100644
--- a/extras/keymap/keymaps/samsung-sx20s
+++ b/extras/keymap/keymaps/samsung-sx20s
@@ -1,4 +1,4 @@
0x74 mute
0x75 mute
-0x77 f21 # FIXME: Touchpad on
-0x79 f21 # FIXME: Touchpad off
+0x77 f22 # Touchpad on
+0x79 f23 # Touchpad off
diff --git a/extras/keymap/keymaps/toshiba-satellite_a110 b/extras/keymap/keymaps/toshiba-satellite_a110
index 0f2aaec..1429409 100644
--- a/extras/keymap/keymaps/toshiba-satellite_a110
+++ b/extras/keymap/keymaps/toshiba-satellite_a110
@@ -1,8 +1,8 @@
0x92 stop
0x93 www
0x94 media
-0x9E f21 # FIXME: Touchpad on
-0x9F f21 # FIXME: Touchpad off
+0x9E f22 # Touchpad on
+0x9F f23 # Touchpad off
0xB9 nextsong
0xD9 brightnessup
0xEE screenlock
diff --git a/extras/keymap/keymaps/toshiba-satellite_m30x b/extras/keymap/keymaps/toshiba-satellite_m30x
index cf6d912..9280ae0 100644
--- a/extras/keymap/keymaps/toshiba-satellite_m30x
+++ b/extras/keymap/keymaps/toshiba-satellite_m30x
@@ -2,6 +2,6 @@
0xd9 brightnessup
0xee screenlock
0x93 media
-0x9e prog1 #touchpad_enable
-0x9f prog2 #touchpad_disable
+0x9e f22 #touchpad_enable
+0x9f f23 #touchpad_disable
diff --git a/extras/keymap/keymaps/zepto-znote b/extras/keymap/keymaps/zepto-znote
index e076516..cf72fda 100644
--- a/extras/keymap/keymaps/zepto-znote
+++ b/extras/keymap/keymaps/zepto-znote
@@ -1,7 +1,7 @@
0x93 switchvideomode # Fn+F3 Toggle Video Output
0x95 brightnessdown # Fn+F4 Brightness Down
0x91 brightnessup # Fn+F5 Brightness Up
-0xA5 f22 # Fn+F6 Disable Touchpad
+0xA5 f23 # Fn+F6 Disable Touchpad
0xA6 f22 # Fn+F6 Enable Touchpad
0xA7 bluetooth # Fn+F10 Enable Bluetooth
0XA9 bluetooth # Fn+F10 Disable Bluetooth
--
1.7.3.2

View file

@ -0,0 +1,56 @@
From ecfad20871e855d9e54d3a528cf9219ce5c93626 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 1 Nov 2010 16:29:09 +0000
Subject: [PATCH] keymap: Add force release for HP touchpad off
Force the touchpad off/on keys getting released, as they usually
only send a "repeat".
https://bugzilla.redhat.com/show_bug.cgi?id=623239
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
Makefile.am | 1 +
extras/keymap/95-keyboard-force-release.rules | 5 +++++
extras/keymap/force-release-maps/hp-other | 3 +++
3 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 extras/keymap/force-release-maps/hp-other
diff --git a/Makefile.am b/Makefile.am
index 3a95046..032eb28 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -601,6 +601,7 @@ dist_udevkeymap_DATA = \
udevkeymapforcereldir = $(libexecdir)/keymaps/force-release
dist_udevkeymapforcerel_DATA = \
+ extras/keymap/force-release-maps/hp-other \
extras/keymap/force-release-maps/samsung-other \
extras/keymap/force-release-maps/common-volume-keys
diff --git a/extras/keymap/95-keyboard-force-release.rules b/extras/keymap/95-keyboard-force-release.rules
index 562dc8d..6f7c0fd 100644
--- a/extras/keymap/95-keyboard-force-release.rules
+++ b/extras/keymap/95-keyboard-force-release.rules
@@ -35,4 +35,9 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellit
ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
+# These are all the HP laptops that setup a touchpad toggle key
+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other"
+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other"
+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keyboard-force-release.sh $devpath hp-other"
+
LABEL="force_release_end"
diff --git a/extras/keymap/force-release-maps/hp-other b/extras/keymap/force-release-maps/hp-other
new file mode 100644
index 0000000..6621370
--- /dev/null
+++ b/extras/keymap/force-release-maps/hp-other
@@ -0,0 +1,3 @@
+# list of scancodes (hex or decimal), optional comment
+0xd8 # Touchpad off
+0xd9 # Touchpad on
--
1.7.3.2

View file

@ -0,0 +1,56 @@
From 9cd075e35b8f660c75b0d72d4bea496fd6459f29 Mon Sep 17 00:00:00 2001
From: David Woodhouse <dwmw2@infradead.org>
Date: Thu, 12 Aug 2010 17:04:55 +0100
Subject: [PATCH 02/23] Add keymap for Lenovo IdeaPad S10-3
Tested on S10-3, but presumably applicable to all IdeaPads.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
Makefile.am | 1 +
extras/keymap/95-keymap.rules | 2 ++
extras/keymap/keymaps/lenovo-ideapad | 7 +++++++
3 files changed, 10 insertions(+), 0 deletions(-)
create mode 100644 extras/keymap/keymaps/lenovo-ideapad
diff --git a/Makefile.am b/Makefile.am
index c16b259..77df6ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -537,6 +537,7 @@ dist_udevkeymap_DATA = \
extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
extras/keymap/keymaps/inventec-symphony_6.0_7.0 \
extras/keymap/keymaps/lenovo-3000 \
+ extras/keymap/keymaps/lenovo-ideapad \
extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \
extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index 13b5571..2241422 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -65,6 +65,8 @@ ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000"
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x6_tablet"
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X200 Tablet*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x200_tablet"
+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad"
+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad"
ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet"
diff --git a/extras/keymap/keymaps/lenovo-ideapad b/extras/keymap/keymaps/lenovo-ideapad
new file mode 100644
index 0000000..d5f2567
--- /dev/null
+++ b/extras/keymap/keymaps/lenovo-ideapad
@@ -0,0 +1,7 @@
+# Key codes observed on S10-3, assumed valid on other IdeaPad models
+0x81 rfkill # does nothing in BIOS
+0x83 display_off # BIOS toggles screen state
+0xB9 brightnessup # does nothing in BIOS
+0xBA brightnessdown # does nothing in BIOS
+0xF1 camera # BIOS toggles camera power
+0xf2 unknown # trackpad enable/disable (does nothing in BIOS)
--
1.7.2.2

View file

@ -0,0 +1,42 @@
From 68bc0d7963a22967cc00244c4fad96fb45870712 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 17 Aug 2010 09:37:57 +0200
Subject: [PATCH 04/23] init: update systemd service files
---
init/udev-retry.service.in | 4 ++--
init/udev-settle.service.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in
index 7667899..d8ed8a8 100644
--- a/init/udev-retry.service.in
+++ b/init/udev-retry.service.in
@@ -4,9 +4,9 @@ DefaultDependencies=no
After=local-fs.target udev.service
[Service]
-Type=finish
+Type=oneshot
ValidNoProcess=yes
-ExecStart=@sbindir@/udevadm trigger --type=failed
+ExecStart=@sbindir@/udevadm trigger --type=failed --action=add
[Install]
WantedBy=sysinit.target
diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in
index 0594d72..4db61f2 100644
--- a/init/udev-settle.service.in
+++ b/init/udev-settle.service.in
@@ -4,7 +4,7 @@ DefaultDependencies=no
After=udev.service
[Service]
-Type=finish
+Type=oneshot
ValidNoProcess=yes
ExecStart=@sbindir@/udevadm settle
--
1.7.2.2

View file

@ -0,0 +1,38 @@
From bd078c90b97c73ba5fe7475947e6ecd20e2eb048 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 17 Aug 2010 18:53:57 +0200
Subject: [PATCH 05/23] init: update systemd service files
---
init/udev-retry.service.in | 1 -
init/udev-settle.service.in | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in
index d8ed8a8..7a0819c 100644
--- a/init/udev-retry.service.in
+++ b/init/udev-retry.service.in
@@ -5,7 +5,6 @@ After=local-fs.target udev.service
[Service]
Type=oneshot
-ValidNoProcess=yes
ExecStart=@sbindir@/udevadm trigger --type=failed --action=add
[Install]
diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in
index 4db61f2..4cb33aa 100644
--- a/init/udev-settle.service.in
+++ b/init/udev-settle.service.in
@@ -5,7 +5,7 @@ After=udev.service
[Service]
Type=oneshot
-ValidNoProcess=yes
+RemainAfterExit=yes
ExecStart=@sbindir@/udevadm settle
[Install]
--
1.7.2.2

View file

@ -0,0 +1,33 @@
From 3bd7b89dc40c4a0440ee5fce2ea907971bfcfb10 Mon Sep 17 00:00:00 2001
From: Marco d'Itri <md@linux.it>
Date: Wed, 18 Aug 2010 13:35:25 +0200
Subject: [PATCH 06/23] udev-acl: do not mistake all SCSI "processor" devices for scanner
Both rules can be removed since now libsane sets libsane_matched also
for SCSI scanners.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589751
---
extras/udev-acl/70-acl.rules | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules
index 6ec04ee..c7134bc 100644
--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -13,11 +13,7 @@ SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl"
# digicams with proprietary protocol
ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl"
-# SCSI scanners
-KERNEL=="sg[0-9]*", ATTRS{type}=="6", TAG+="udev-acl"
-KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", TAG+="udev-acl"
-
-# USB scanners
+# SCSI and USB scanners
ENV{libsane_matched}=="yes", TAG+="udev-acl"
# HPLIP devices (necessary for ink level check and HP tool maintenance)
--
1.7.2.2

View file

@ -0,0 +1,47 @@
From d15b727ef1375c665057c0fa278b2ea3778b8d3d Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Thu, 19 Aug 2010 08:48:44 +0200
Subject: [PATCH 07/23] init: add 'udev -' to description in systemd service files
---
init/udev-retry.service.in | 2 +-
init/udev-settle.service.in | 2 +-
init/udev.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in
index 7a0819c..a6612da 100644
--- a/init/udev-retry.service.in
+++ b/init/udev-retry.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=re-trigger failed events after filesystems are available
+Description=udev - re-trigger failed events after filesystems are available
DefaultDependencies=no
After=local-fs.target udev.service
diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in
index 4cb33aa..578a24f 100644
--- a/init/udev-settle.service.in
+++ b/init/udev-settle.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=wait until full initialization
+Description=udev - wait until full initialization
DefaultDependencies=no
After=udev.service
diff --git a/init/udev.service.in b/init/udev.service.in
index e95cb47..5a63b77 100644
--- a/init/udev.service.in
+++ b/init/udev.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=/dev and kernel device manager
+Description=udev - /dev and kernel device manager
DefaultDependencies=no
Before=sysinit.target
--
1.7.2.2

View file

@ -0,0 +1,41 @@
From c25bfbfb1b20781698ff3c8cbc884a9e190052ee Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Thu, 19 Aug 2010 08:49:43 +0200
Subject: [PATCH 08/23] udevd: add pid to kmsg logs
---
udev/udev-event.c | 4 ++--
udev/udevd.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 9b5326b..ae523f8 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -454,8 +454,8 @@ static void rename_netif_kernel_log(struct ifreq ifr)
return;
}
- fprintf(f, "<6>udev: renamed network interface %s to %s\n",
- ifr.ifr_name, ifr.ifr_newname);
+ fprintf(f, "<6>udev[%u]: renamed network interface %s to %s\n",
+ getpid(), ifr.ifr_name, ifr.ifr_newname);
fclose(f);
}
diff --git a/udev/udevd.c b/udev/udevd.c
index 61b76f5..ad2ca3b 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -1298,7 +1298,7 @@ int main(int argc, char *argv[])
f = fopen("/dev/kmsg", "w");
if (f != NULL) {
- fprintf(f, "<6>udev: starting version " VERSION "\n");
+ fprintf(f, "<6>udev[%u]: starting version " VERSION "\n", getpid());
fclose(f);
}
--
1.7.2.2

View file

@ -0,0 +1,47 @@
From 4c9b12a7aa57e43e568b78da9cbed4138b1292df Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Thu, 19 Aug 2010 18:02:20 +0200
Subject: [PATCH 09/23] init: edit systemd service descriptions
---
init/udev-retry.service.in | 2 +-
init/udev-settle.service.in | 2 +-
init/udev.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/udev-retry.service.in b/init/udev-retry.service.in
index a6612da..ab8241b 100644
--- a/init/udev-retry.service.in
+++ b/init/udev-retry.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=udev - re-trigger failed events after filesystems are available
+Description=udev Retry Failed Events
DefaultDependencies=no
After=local-fs.target udev.service
diff --git a/init/udev-settle.service.in b/init/udev-settle.service.in
index 578a24f..d58ea9c 100644
--- a/init/udev-settle.service.in
+++ b/init/udev-settle.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=udev - wait until full initialization
+Description=udev Wait for Complete Device Initialization
DefaultDependencies=no
After=udev.service
diff --git a/init/udev.service.in b/init/udev.service.in
index 5a63b77..b07f4db 100644
--- a/init/udev.service.in
+++ b/init/udev.service.in
@@ -1,5 +1,5 @@
[Unit]
-Description=udev - /dev and kernel device manager
+Description=udev Kernel Device Manager
DefaultDependencies=no
Before=sysinit.target
--
1.7.2.2

View file

@ -0,0 +1,42 @@
From 6593e8961afbe0b74d5a67c545a991c7733e88df Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Fri, 20 Aug 2010 12:19:23 +0200
Subject: [PATCH 11/23] udev(7): Point out required extension, and remove some confusion
Rules files must end in .rules.
Also drop the redundant and confusing sentence about "file names must be
unique". What is really meant is explained in a better way in the paragraph
above.
https://launchpad.net/bugs/616108
---
udev/udev.xml | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/udev/udev.xml b/udev/udev.xml
index 20c394c..336b203 100644
--- a/udev/udev.xml
+++ b/udev/udev.xml
@@ -75,12 +75,13 @@
the custom rules directory <filename>/etc/udev/rules.d/</filename>
and the temporary rules directory <filename>/dev/.udev/rules.d/</filename>.
All rule files are sorted and processed in lexical order, regardless
- in which of these directories they live.</para>
+ in which of these directories they live. Files in
+ <filename>/etc/udev/rules.d/</filename> have precedence over files with
+ the same name in <filename>/lib/udev/rules.d/</filename>. This can be
+ used to ignore a default rules file if needed.</para>
- <para>Rule files are required to have a unique name, duplicate file names
- are ignored. Files in <filename>/etc/udev/rules.d/</filename> have precedence
- over files with the same name in <filename>/lib/udev/rules.d/</filename>. This
- can be used to ignore a default rules file if needed.</para>
+ <para>Rule files must end in <filename>.rules</filename>, other extensions
+ are ignored.</para>
<para>Every line in the rules file contains at least one key value pair.
There are two kind of keys, match and assignment keys.
--
1.7.2.2

View file

@ -0,0 +1,63 @@
From acf865b68e1a5c78677537b373b6e082c287fc27 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Sun, 22 Aug 2010 11:00:34 +0200
Subject: [PATCH 12/23] keymap: Add Onkyo PC
Thanks to Pau Oliva!
https://launchpad.net/bugs/612529
---
Makefile.am | 1 +
extras/keymap/95-keymap.rules | 2 ++
extras/keymap/keymaps/onkyo | 14 ++++++++++++++
3 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 extras/keymap/keymaps/onkyo
diff --git a/Makefile.am b/Makefile.am
index 77df6ab..512de34 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -555,6 +555,7 @@ dist_udevkeymap_DATA = \
extras/keymap/keymaps/module-sony \
extras/keymap/keymaps/module-sony-old \
extras/keymap/keymaps/olpc-xo \
+ extras/keymap/keymaps/onkyo \
extras/keymap/keymaps/oqo-model2 \
extras/keymap/keymaps/samsung-other \
extras/keymap/keymaps/samsung-sq1us \
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index 2241422..e9d5721 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -127,6 +127,8 @@ ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite M30X", RUN+="
ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2"
+ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo"
+
ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus"
ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1"
diff --git a/extras/keymap/keymaps/onkyo b/extras/keymap/keymaps/onkyo
new file mode 100644
index 0000000..7dd80a1
--- /dev/null
+++ b/extras/keymap/keymaps/onkyo
@@ -0,0 +1,14 @@
+0xA0 mute # Fn+D
+0xAE volumedown # Fn+F
+0xB0 volumeup # Fn+G
+0xDF sleep # Fn+W
+0xE0 bluetooth # Fn+H
+0xE2 cyclewindows # Fn+Esc
+0xEE battery # Fn+Q
+0xF0 media # Fn+R
+0xF5 switchvideomode # Fn+E
+0xF6 camera # Fn+T
+0xF7 f22 # Fn+Y (touchpad toggle)
+0xF8 brightnessup # Fn+S
+0xF9 brightnessdown # Fn+A
+0xFB wlan # Fn+J
--
1.7.2.2

View file

@ -0,0 +1,26 @@
From 92cffb0bd18bd8fd245666a519ad0e54dc537031 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Mon, 23 Aug 2010 10:47:28 +0200
Subject: [PATCH 13/23] keymap: Add HP G60
https://launchpad.net/bugs/554944
---
extras/keymap/95-keymap.rules | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index e9d5721..5656de9 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -72,7 +72,7 @@ ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*", RUN+="keymap $name hewlett-packard-2510p_2530p"
+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2"
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100"
# HP Pavillion dv6315ea has empty DMI_VENDOR
--
1.7.2.2

View file

@ -0,0 +1,58 @@
From 13f90be7a33353fdbcd4a389630a05c608bdf2a4 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Wed, 25 Aug 2010 16:26:54 +0200
Subject: [PATCH 14/23] udevd: remove unneeded credential passing from init_notify()
---
udev/udevd.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/udev/udevd.c b/udev/udevd.c
index ad2ca3b..374a4e0 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -964,15 +964,10 @@ static int init_notify(const char *state)
int fd = -1, r;
struct msghdr msghdr;
struct iovec iovec;
- struct ucred *ucred;
union {
struct sockaddr sa;
struct sockaddr_un un;
} sockaddr;
- union {
- struct cmsghdr cmsghdr;
- uint8_t buf[CMSG_SPACE(sizeof(struct ucred))];
- } control;
const char *e;
if (!(e = getenv("NOTIFY_SOCKET"))) {
@@ -1002,16 +997,6 @@ static int init_notify(const char *state)
iovec.iov_base = (char*) state;
iovec.iov_len = strlen(state);
- memset(&control, 0, sizeof(control));
- control.cmsghdr.cmsg_level = SOL_SOCKET;
- control.cmsghdr.cmsg_type = SCM_CREDENTIALS;
- control.cmsghdr.cmsg_len = CMSG_LEN(sizeof(struct ucred));
-
- ucred = (struct ucred*) CMSG_DATA(&control.cmsghdr);
- ucred->pid = getpid();
- ucred->uid = getuid();
- ucred->gid = getgid();
-
memset(&msghdr, 0, sizeof(msghdr));
msghdr.msg_name = &sockaddr;
msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e);
@@ -1019,8 +1004,6 @@ static int init_notify(const char *state)
msghdr.msg_namelen = sizeof(struct sockaddr_un);
msghdr.msg_iov = &iovec;
msghdr.msg_iovlen = 1;
- msghdr.msg_control = &control;
- msghdr.msg_controllen = control.cmsghdr.cmsg_len;
if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
r = -errno;
--
1.7.2.2

View file

@ -0,0 +1,48 @@
From c61eea9459045c2c9032a0c98234985a371fac58 Mon Sep 17 00:00:00 2001
From: Luca Tettamanti <kronos.it@gmail.com>
Date: Mon, 23 Aug 2010 14:35:37 +0200
Subject: [PATCH 15/23] Add support for oom_score_adj
/proc/<pid>/oom_adj has been deprecated (kernel v2.6.36) due to the
rework of the badness heuristic; oom_score_adj is the replacement.
Keep a fallback to the old interface for compatibility with older
kernels.
See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a63d83f427fbce97a6cea0db2e64b0eb8435cd10
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
udev/udevd.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/udev/udevd.c b/udev/udevd.c
index 374a4e0..0ec3c3d 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -1285,12 +1285,19 @@ int main(int argc, char *argv[])
fclose(f);
}
- /* OOM_DISABLE == -17 */
- fd = open("/proc/self/oom_adj", O_RDWR);
+ fd = open("/proc/self/oom_score_adj", O_RDWR);
if (fd < 0) {
- err(udev, "error disabling OOM: %m\n");
+ /* Fallback to old interface */
+ fd = open("/proc/self/oom_adj", O_RDWR);
+ if (fd < 0) {
+ err(udev, "error disabling OOM: %m\n");
+ } else {
+ /* OOM_DISABLE == -17 */
+ write(fd, "-17", 3);
+ close(fd);
+ }
} else {
- write(fd, "-17", 3);
+ write(fd, "-1000", 5);
close(fd);
}
--
1.7.2.2

View file

@ -0,0 +1,28 @@
From 38b5ccbcf7f3643ea8180a8186cfe3e5fa9cb983 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Wed, 25 Aug 2010 17:02:51 +0200
Subject: [PATCH 16/23] keymap: Fix Sony VAIO VGN-SZ2HP/B
Reportedly this needs the module-sony keymap, not the -old one.
https://launchpad.net/bugs/613578
---
extras/keymap/95-keymap.rules | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index 5656de9..cb066bd 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -46,7 +46,7 @@ ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons",
ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony"
# Older Vaios have some different keys
-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*|*VGN-SZ2HP_B*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
+ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
#
# The following rules belong to standard i8042 AT keyboard with high key codes.
--
1.7.2.2

View file

@ -0,0 +1,32 @@
From 83184d008ba23724fd30996440534c0633a0d0aa Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Fri, 27 Aug 2010 16:54:52 +0200
Subject: [PATCH 17/23] udev(7) manpage: Fix description of $attr
Fix the manpage to describe the real behaviour of $attr: It doesn't search all
parent devices any more, just the one selected by KERNELS etc.
https://launchpad.net/bugs/348513
---
udev/udev.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/udev/udev.xml b/udev/udev.xml
index 336b203..6085dff 100644
--- a/udev/udev.xml
+++ b/udev/udev.xml
@@ -578,8 +578,9 @@
<listitem>
<para>The value of a sysfs attribute found at the device, where
all keys of the rule have matched. If the matching device does not have
- such an attribute, follow the chain of parent devices and use the value
- of the first attribute that matches.
+ such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or
+ ATTRS test selected a parent device, use the attribute from that
+ parent device.
If the attribute is a symlink, the last element of the symlink target is
returned as the value.</para>
</listitem>
--
1.7.2.2

View file

@ -0,0 +1,57 @@
From e4dcdc4ab232bcbbe61a2026c16e647d9302cdd2 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Fri, 27 Aug 2010 18:12:59 +0200
Subject: [PATCH 18/23] gudev: fix crash if netlink is not available
gudev_client_new() assumes that priv->monitor is never NULL, but this happens
on older kernels. Let's not crash client programs because of that.
https://launchpad.net/bugs/581527
---
extras/gudev/gudevclient.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/extras/gudev/gudevclient.c b/extras/gudev/gudevclient.c
index fa31f70..f5f7a19 100644
--- a/extras/gudev/gudevclient.c
+++ b/extras/gudev/gudevclient.c
@@ -93,6 +93,8 @@ monitor_event (GIOChannel *source,
GUdevDevice *device;
struct udev_device *udevice;
+ if (client->priv->monitor == NULL)
+ goto out;
udevice = udev_monitor_receive_device (client->priv->monitor);
if (udevice == NULL)
goto out;
@@ -216,17 +218,21 @@ g_udev_client_constructed (GObject *object)
*s = '\0';
}
- udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype);
+ if (client->priv->monitor != NULL)
+ udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype);
g_free (subsystem);
}
/* listen to events, and buffer them */
- udev_monitor_enable_receiving (client->priv->monitor);
-
- channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor));
- client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client);
- g_io_channel_unref (channel);
+ if (client->priv->monitor != NULL)
+ {
+ udev_monitor_enable_receiving (client->priv->monitor);
+ channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor));
+ client->priv->watch_id = g_io_add_watch (channel, G_IO_IN, monitor_event, client);
+ g_io_channel_unref (channel);
+ } else
+ client->priv->watch_id = NULL;
}
if (G_OBJECT_CLASS (g_udev_client_parent_class)->constructed != NULL)
--
1.7.2.2

View file

@ -0,0 +1,28 @@
From d17c065e28fa4baac90b02b4913c7ef32d54f3c7 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Fri, 27 Aug 2010 18:48:53 +0200
Subject: [PATCH 19/23] keymap: Fix Acer TravelMate 4720
The previous change just fixed the Bluetooth key, but Screen Lock and Browser
also need to be changed.
https://launchpad.net/bugs/569815
---
extras/keymap/95-keymap.rules | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/extras/keymap/95-keymap.rules b/extras/keymap/95-keymap.rules
index cb066bd..913b380 100644
--- a/extras/keymap/95-keymap.rules
+++ b/extras/keymap/95-keymap.rules
@@ -85,6 +85,7 @@ ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth"
+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g"
--
1.7.2.2

View file

@ -0,0 +1,35 @@
From 326c5fc3ea684825629eccaf33a548759162a539 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 31 Aug 2010 21:29:21 +0200
Subject: [PATCH 22/23] set SELinux context on 'add' but not on 'change' events
---
udev/udev-node.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/udev/udev-node.c b/udev/udev-node.c
index 228b3eb..c8113f1 100644
--- a/udev/udev-node.c
+++ b/udev/udev-node.c
@@ -56,10 +56,17 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_
info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid);
chmod(file, mode);
chown(file, uid, gid);
- udev_selinux_lsetfilecon(udev, file, mode);
} else {
info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid);
}
+ /*
+ * Set initial selinux file context only on add events.
+ * We set the proper context on bootup (triger) or for newly
+ * added devices, but we don't change it later, in case
+ * something else has set a custom context in the meantime.
+ */
+ if (strcmp(udev_device_get_action(dev), "add") == 0)
+ udev_selinux_lsetfilecon(udev, file, mode);
/* always update timestamp when we re-use the node, like on media change events */
utimensat(AT_FDCWD, file, NULL, 0);
} else {
--
1.7.2.2

View file

@ -0,0 +1,28 @@
From af29bf0966994bc233282148f519e12ea29e1c5a Mon Sep 17 00:00:00 2001
From: Marco d'Itri <md@linux.it>
Date: Tue, 31 Aug 2010 21:44:34 +0200
Subject: [PATCH 23/23] do not create persistent name rules for KVM network interfaces
The virtual interfaces created by KVM are stable, 54:52:00 is the MAC-48
range of KVM.
---
.../75-persistent-net-generator.rules | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules
index a9dfdce..8119d0e 100644
--- a/extras/rule_generator/75-persistent-net-generator.rules
+++ b/extras/rule_generator/75-persistent-net-generator.rules
@@ -29,6 +29,9 @@ ENV{MATCHADDR}="$attr{address}"
# match interface type
ENV{MATCHIFTYPE}="$attr{type}"
+# ignore KVM virtual interfaces
+ENV{MATCHADDR}=="54:52:00:*", GOTO="persistent_net_generator_end"
+
# These vendors are known to violate the local MAC address assignment scheme
# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom
ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist"
--
1.7.2.2

View file

@ -0,0 +1,26 @@
From 24af530a543c70ac59fdd244377d648ef77a0e21 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Thu, 12 Aug 2010 07:10:12 +0200
Subject: [PATCH 1/9] cdrom_id: Add media status debugging
Show which media status the hardware originally reports, since we mangle it in
some cases.
---
extras/cdrom_id/cdrom_id.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 83e95d5..d59991c 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -573,6 +573,7 @@ static int cd_media_info(struct udev *udev, int fd)
cd_media = 1;
info(udev, "disk type %02x\n", header[8]);
+ info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]);
/* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */
if (!cd_media_cd_rom)
--
1.7.2.3

View file

@ -0,0 +1,34 @@
From b367a1c9d8a0f565effcdb45f86a365be1c8b622 Mon Sep 17 00:00:00 2001
From: Jan Drzewiecki <jonie@icpnet.pl>
Date: Fri, 13 Aug 2010 07:24:29 +0200
Subject: [PATCH 2/9] cdrom_id: Drop MEDIA_SESSION_NEXT for DVD-RW-RO
Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite
mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT
property either, since in that mode you can never append tracks/sessions; this
just works in sequential mode.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
extras/cdrom_id/cdrom_id.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index d59991c..f9d6e0b 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -690,8 +690,9 @@ static int cd_media_info(struct udev *udev, int fd)
}
determined:
- /* "other" is e. g. DVD-RAM, can't append sessions there either */
- if ((header[2] & 3) < 2)
+ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in
+ * restricted overwrite mode can never append, only in sequential mode */
+ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro)
cd_media_session_next = header[10] << 8 | header[5];
cd_media_session_count = header[9] << 8 | header[4];
cd_media_track_count = header[11] << 8 | header[6];
--
1.7.2.3

View file

@ -0,0 +1,53 @@
From 2458db3edd8d66827b34978ff471dff8f879e9ab Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Mon, 30 Aug 2010 15:33:26 +0200
Subject: [PATCH 3/9] cdrom_id: Fix DVD-RW media detection
Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW
test to feature_profiles() (which reads the drive capabilities), which caused
every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to
cd_profiles() instead, to just check the current profile.
---
extras/cdrom_id/cdrom_id.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index f9d6e0b..8480d7b 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -297,14 +297,9 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si
cd_dvd_ram = 1;
break;
case 0x13:
- info(udev, "profile 0x%02x media_dvd_rw\n", profile);
- cd_media_dvd_rw = 1;
- cd_media_dvd_rw_ro = 1;
- break;
case 0x14:
info(udev, "profile 0x%02x dvd_rw\n", profile);
cd_dvd_rw = 1;
- cd_media_dvd_rw_seq = 1;
break;
case 0x1B:
info(udev, "profile 0x%02x dvd_plus_r\n", profile);
@@ -486,10 +481,16 @@ static int cd_profiles(struct udev *udev, int fd)
cd_media_dvd_ram = 1;
break;
case 0x13:
+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_ro = 1;
+ break;
case 0x14:
- info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile);
+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile);
cd_media = 1;
cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_seq = 1;
break;
case 0x1B:
info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile);
--
1.7.2.3

View file

@ -0,0 +1,42 @@
From 5e267ea5a36de0b2a9a8965ca93dd45bbd6b1a8b Mon Sep 17 00:00:00 2001
From: Jan Drzewiecki <jonie@icpnet.pl>
Date: Tue, 31 Aug 2010 00:37:28 +0200
Subject: [PATCH 4/9] cdrom_id: Fix DVD blank detection for sloppy firmware
Reportedly, many CD drive firmwares will only consider the MSB in a READ
command, thus if we request 17 blocks to be read, we'll actually only get 16 in
many cases, and thus miss out the interesting sector #17. This would lead to
falsely considering nonempty DVDs as blank.
Fetch 32 blocks now, which should work everywhere.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
---
extras/cdrom_id/cdrom_id.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 8480d7b..0153af6 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -590,7 +590,7 @@ static int cd_media_info(struct udev *udev, int fd)
* always "complete", DVD-RAM are "other" or "complete" if the disc is
* write protected; we need to check the contents if it is blank */
if ((cd_media_dvd_rw_ro || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) {
- unsigned char buffer[17 * 2048];
+ unsigned char buffer[32 * 2048];
unsigned char result, len;
int block, offset;
@@ -661,7 +661,7 @@ static int cd_media_info(struct udev *udev, int fd)
scsi_cmd_init(udev, &sc, buffer, sizeof(buffer));
scsi_cmd_set(udev, &sc, 0, 0x28);
scsi_cmd_set(udev, &sc, 5, 0);
- scsi_cmd_set(udev, &sc, 8, 17);
+ scsi_cmd_set(udev, &sc, 8, 32);
scsi_cmd_set(udev, &sc, 9, 0);
err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer));
if ((err != 0)) {
--
1.7.2.3

View file

@ -0,0 +1,66 @@
From ea88774a922c734afd751a59d8102bfa4806a1a6 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 5 Oct 2010 14:34:55 +0200
Subject: [PATCH 5/9] cdrom_id: Try reading the medium if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if we can read
data from the drive, and assume that we have a CD-ROM medium if it succeeds.
---
extras/cdrom_id/cdrom_id.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 0153af6..f65f04f 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -350,6 +350,34 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si
return 0;
}
+static int cd_profiles_broken_mmc(struct udev *udev, int fd)
+{
+ struct scsi_cmd sc;
+ unsigned char buffer[16 * 2048];
+ int err;
+
+ /* we land here if both the standard and the old MMC commands failed;
+ * this might happen on broken wanna-be-CD USB drives like the IronKey.
+ * As a last resort, try to read data to see whether it has a medium.
+ */
+ scsi_cmd_init(udev, &sc, buffer, sizeof(buffer));
+ scsi_cmd_set(udev, &sc, 0, 0x28);
+ scsi_cmd_set(udev, &sc, 5, 0);
+ scsi_cmd_set(udev, &sc, 8, 16);
+ scsi_cmd_set(udev, &sc, 9, 0);
+ err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer));
+ if ((err != 0)) {
+ info(udev, "READ DATA failed, assuming no medium\n");
+ return -1;
+ }
+
+ /* that's all we can claim if we can read data */
+ info(udev, "READ DATA succeeded, assuming CD-ROM medium\n");
+ cd_media = 1;
+ cd_media_cd_rom = 1;
+ return 0;
+}
+
static int cd_profiles_old_mmc(struct udev *udev, int fd)
{
struct scsi_cmd sc;
@@ -364,8 +392,8 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd)
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- info(udev, "no current profile, assuming no media\n");
- return -1;
+ info(udev, "no current profile, probing readability of medium\n");
+ return cd_profiles_broken_mmc(udev, fd);
};
cd_media = 1;
--
1.7.2.3

View file

@ -0,0 +1,66 @@
From 13e0fca5dff286921a8df0cd737e6e1224e53275 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 5 Oct 2010 14:57:04 +0200
Subject: [PATCH 6/9] Revert "cdrom_id: Try reading the medium if all MMC commands fail"
Turns out we can do this much simpler by assuming that cd_media_compat() works,
which seems to be the case for the IronKey.
This reverts commit ea88774a922c734afd751a59d8102bfa4806a1a6.
---
extras/cdrom_id/cdrom_id.c | 32 ++------------------------------
1 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index f65f04f..0153af6 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -350,34 +350,6 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si
return 0;
}
-static int cd_profiles_broken_mmc(struct udev *udev, int fd)
-{
- struct scsi_cmd sc;
- unsigned char buffer[16 * 2048];
- int err;
-
- /* we land here if both the standard and the old MMC commands failed;
- * this might happen on broken wanna-be-CD USB drives like the IronKey.
- * As a last resort, try to read data to see whether it has a medium.
- */
- scsi_cmd_init(udev, &sc, buffer, sizeof(buffer));
- scsi_cmd_set(udev, &sc, 0, 0x28);
- scsi_cmd_set(udev, &sc, 5, 0);
- scsi_cmd_set(udev, &sc, 8, 16);
- scsi_cmd_set(udev, &sc, 9, 0);
- err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer));
- if ((err != 0)) {
- info(udev, "READ DATA failed, assuming no medium\n");
- return -1;
- }
-
- /* that's all we can claim if we can read data */
- info(udev, "READ DATA succeeded, assuming CD-ROM medium\n");
- cd_media = 1;
- cd_media_cd_rom = 1;
- return 0;
-}
-
static int cd_profiles_old_mmc(struct udev *udev, int fd)
{
struct scsi_cmd sc;
@@ -392,8 +364,8 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd)
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- info(udev, "no current profile, probing readability of medium\n");
- return cd_profiles_broken_mmc(udev, fd);
+ info(udev, "no current profile, assuming no media\n");
+ return -1;
};
cd_media = 1;
--
1.7.2.3

View file

@ -0,0 +1,38 @@
From 678df8a461c7573bf423a39be383bc7b70d943df Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 5 Oct 2010 14:59:51 +0200
Subject: [PATCH 7/9] cdrom_id: Fall back to CDROM_DRIVE_STATUS if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if
cd_media_compat() detected that there is a disc present, and assume that we
have a CD-ROM medium.
---
extras/cdrom_id/cdrom_id.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 0153af6..e7a3e40 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -364,8 +364,14 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd)
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- info(udev, "no current profile, assuming no media\n");
- return -1;
+ if (cd_media == 1) {
+ info(udev, "no current profile, but disc is present; assuming CD-ROM\n");
+ cd_media_cd_rom = 1;
+ return 0;
+ } else {
+ info(udev, "no current profile, assuming no media\n");
+ return -1;
+ }
};
cd_media = 1;
--
1.7.2.3

View file

@ -0,0 +1,56 @@
From 1ebd2a5620c93ef4698485d392c19ded675412d2 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 5 Oct 2010 17:56:19 +0200
Subject: [PATCH 8/9] cdrom_id: Don't read beyond "last track" in TOC
Read the first and last track from the TOC header, and do not go beyond that
stated number of tracks when reading the TOC. Otherwise we interpret random
data which leads to bogus tracks. (Reported on an IronKey, which reported 1
data track, and 4 audio tracks which weren't actually present.)
---
extras/cdrom_id/cdrom_id.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index e7a3e40..1b43fe4 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -712,7 +712,7 @@ static int cd_media_toc(struct udev *udev, int fd)
struct scsi_cmd sc;
unsigned char header[12];
unsigned char toc[2048];
- unsigned int len, i;
+ unsigned int len, i, num_tracks;
unsigned char *p;
int err;
@@ -728,11 +728,13 @@ static int cd_media_toc(struct udev *udev, int fd)
}
len = (header[0] << 8 | header[1]) + 2;
- info(udev, "READ TOC: len: %d\n", len);
+ info(udev, "READ TOC: len: %d, start track: %d, end track: %d\n", len, header[2], header[3]);
if (len > sizeof(toc))
return -1;
if (len < 2)
return -1;
+ /* 2: first track, 3: last track */
+ num_tracks = header[3] - header[2] + 1;
/* empty media has no tracks */
if (len < 8)
@@ -750,7 +752,10 @@ static int cd_media_toc(struct udev *udev, int fd)
return -1;
}
- for (p = toc+4, i = 4; i < len-8; i += 8, p += 8) {
+ /* Take care to not iterate beyond the last valid track as specified in
+ * the TOC, but also avoid going beyond the TOC length, just in case
+ * the last track number is invalidly large */
+ for (p = toc+4, i = 4; i < len-8 && num_tracks > 0; i += 8, p += 8, --num_tracks) {
unsigned int block;
unsigned int is_data_track;
--
1.7.2.3

View file

@ -0,0 +1,124 @@
From d7cd2b16110c806128747ee245aaa883dd52039d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 7 Oct 2010 17:02:21 +0200
Subject: [PATCH 9/9] cdrom_id: request the drive profile features with a dynamic length
Some drives don't like huge feature buffers, so we query twice. First
run for the current profile and to get the length.
Second time we query the whole profile feature set.
---
extras/cdrom_id/cdrom_id.c | 81 ++++++++++++++++++++++++++++---------------
1 files changed, 53 insertions(+), 28 deletions(-)
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 1b43fe4..ec001cd 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -398,12 +398,12 @@ static int cd_profiles(struct udev *udev, int fd)
unsigned int i;
int err;
+ /* First query the current profile */
scsi_cmd_init(udev, &sc, features, sizeof(features));
scsi_cmd_set(udev, &sc, 0, 0x46);
- scsi_cmd_set(udev, &sc, 7, (sizeof(features) >> 8) & 0xff);
- scsi_cmd_set(udev, &sc, 8, sizeof(features) & 0xff);
+ scsi_cmd_set(udev, &sc, 8, 8);
scsi_cmd_set(udev, &sc, 9, 0);
- err = scsi_cmd_run(udev, &sc, fd, features, sizeof(features));
+ err = scsi_cmd_run(udev, &sc, fd, features, 8);
if ((err != 0)) {
info_scsi_cmd_err(udev, "GET CONFIGURATION", err);
/* handle pre-MMC2 drives which do not support GET CONFIGURATION */
@@ -415,31 +415,6 @@ static int cd_profiles(struct udev *udev, int fd)
return -1;
}
- len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3];
- info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len);
-
- if (len > sizeof(features)) {
- info(udev, "can not get features in a single query, truncating\n");
- len = sizeof(features);
- }
-
- /* device features */
- for (i = 8; i+4 < len; i += (4 + features[i+3])) {
- unsigned int feature;
-
- feature = features[i] << 8 | features[i+1];
-
- switch (feature) {
- case 0x00:
- info(udev, "GET CONFIGURATION: feature 'profiles', with %i entries\n", features[i+3] / 4);
- feature_profiles(udev, &features[i]+4, features[i+3]);
- break;
- default:
- info(udev, "GET CONFIGURATION: feature 0x%04x <ignored>, with 0x%02x bytes\n", feature, features[i+3]);
- break;
- }
- }
-
cur_profile = features[6] << 8 | features[7];
if (cur_profile > 0) {
info(udev, "current profile 0x%02x\n", cur_profile);
@@ -553,6 +528,56 @@ static int cd_profiles(struct udev *udev, int fd)
info(udev, "profile 0x%02x <ignored>\n", cur_profile);
break;
}
+
+
+ len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3];
+ info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len);
+
+ if (len > sizeof(features)) {
+ info(udev, "can not get features in a single query, truncating\n");
+ len = sizeof(features);
+ } else if (len <= 8) {
+ len = sizeof(features);
+ }
+
+ /* Now get the full feature buffer */
+ scsi_cmd_init(udev, &sc, features, len);
+ scsi_cmd_set(udev, &sc, 0, 0x46);
+ scsi_cmd_set(udev, &sc, 7, ( len >> 8 ) & 0xff);
+ scsi_cmd_set(udev, &sc, 8, len & 0xff);
+ scsi_cmd_set(udev, &sc, 9, 0);
+ err = scsi_cmd_run(udev, &sc, fd, features, len);
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "GET CONFIGURATION", err);
+ return -1;
+ }
+
+ /* parse the length once more, in case the drive decided to have other features suddenly :) */
+ len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3];
+ info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len);
+
+ if (len > sizeof(features)) {
+ info(udev, "can not get features in a single query, truncating\n");
+ len = sizeof(features);
+ }
+
+ /* device features */
+ for (i = 8; i+4 < len; i += (4 + features[i+3])) {
+ unsigned int feature;
+
+ feature = features[i] << 8 | features[i+1];
+
+ switch (feature) {
+ case 0x00:
+ info(udev, "GET CONFIGURATION: feature 'profiles', with %i entries\n", features[i+3] / 4);
+ feature_profiles(udev, &features[i]+4, features[i+3]);
+ break;
+ default:
+ info(udev, "GET CONFIGURATION: feature 0x%04x <ignored>, with 0x%02x bytes\n", feature, features[i+3]);
+ break;
+ }
+ }
+
return 0;
}
--
1.7.2.3

View file

@ -1,6 +1,6 @@
Patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done
@for i in 0*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done
patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done
@for i in 0*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done

View file

@ -1 +1,2 @@
65459a1f090082c0471bf4e5112208d7 udev-160.tar.bz2
2f42aff9f8c7258fecde71df321032b7 udev-161.tar.bz2.sign
95b6a0ffc9913f3e8021c65f51eb4f88 udev-161.tar.bz2

View file

@ -55,6 +55,7 @@ if ! [ -x /sbin/hotplug ]; then
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
fi
fi
[ -c /dev/systty ] && ln -fs tty0 /dev/systty
/sbin/udevd -d

View file

@ -0,0 +1,20 @@
diff -urN udev-161/extras/cdrom_id/cdrom_id.c udev-161.new/extras/cdrom_id/cdrom_id.c
--- udev-161/extras/cdrom_id/cdrom_id.c 2010-10-05 16:59:22.000000000 +0200
+++ udev-161.new/extras/cdrom_id/cdrom_id.c 2010-10-05 16:59:06.000000000 +0200
@@ -364,8 +364,14 @@
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- info(udev, "no current profile, assuming no media\n");
- return -1;
+ if (cd_media == 1) {
+ info(udev, "no current profile, but disc is present; assuming CD-ROM\n");
+ cd_media_cd_rom = 1;
+ return 0;
+ } else {
+ info(udev, "no current profile, assuming no media\n");
+ return -1;
+ }
};
cd_media = 1;

View file

@ -0,0 +1,25 @@
commit 5e199245f2d2fd03c2586a7f1140300b073a4abe
Author: Harald Hoyer <harald@redhat.com>
Date: Thu Mar 17 20:36:20 2011 +0100
udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl
Used by "concordance" to access Logitech Harmony programmable remote
controls.
http://www.phildev.net/concordance/
diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules
index dd5a7ab..037349d 100644
--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -52,6 +52,9 @@ ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl"
# PDA devices
ENV{ID_PDA}=="*?", TAG+="udev-acl"
+# Programmable remote control
+ENV{ID_REMOTE_CONTROL}=="1", TAG+="udev-acl"
+
# joysticks
SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl"

View file

@ -0,0 +1,345 @@
commit 98ab6a377285d5943563cfa397e8b350e43878ec
Author: David Zeuthen <davidz@redhat.com>
Date: Tue Mar 15 12:05:00 2011 -0400
cdrom_id: Don't ignore profiles when there is no media available
Just because the GET CONFIGURATION MMC-2 command returns the current
profile as 0 does not mean that we can ignore the profiles describing
the capabilities of the drive - it only means that there currently is
no recognized media in the drive. Therefore, do process the returned
profiles even when cur_profile is 0.
This fixes a bug where only
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
was returned when there is no media in the drive instead of
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RW=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_BD=1
ID_CDROM_BD_R=1
ID_CDROM_BD_RE=1
ID_CDROM_HDDVD=1
as is returned now.
Signed-off-by: David Zeuthen <davidz@redhat.com>
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 4a58a49..b2f897e 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -261,6 +261,115 @@ static int cd_inquiry(struct udev *udev, int fd) {
return 0;
}
+static void feature_profile_media(struct udev *udev, int cur_profile)
+{
+ switch (cur_profile) {
+ case 0x03:
+ case 0x04:
+ case 0x05:
+ info(udev, "profile 0x%02x \n", cur_profile);
+ cd_media = 1;
+ cd_media_mo = 1;
+ break;
+ case 0x08:
+ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile);
+ cd_media = 1;
+ cd_media_cd_rom = 1;
+ break;
+ case 0x09:
+ info(udev, "profile 0x%02x media_cd_r\n", cur_profile);
+ cd_media = 1;
+ cd_media_cd_r = 1;
+ break;
+ case 0x0a:
+ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile);
+ cd_media = 1;
+ cd_media_cd_rw = 1;
+ break;
+ case 0x10:
+ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_rom = 1;
+ break;
+ case 0x11:
+ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_r = 1;
+ break;
+ case 0x12:
+ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_ram = 1;
+ break;
+ case 0x13:
+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_ro = 1;
+ break;
+ case 0x14:
+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_seq = 1;
+ break;
+ case 0x1B:
+ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_plus_r = 1;
+ break;
+ case 0x1A:
+ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_plus_rw = 1;
+ break;
+ case 0x2A:
+ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_plus_rw_dl = 1;
+ break;
+ case 0x2B:
+ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_plus_r_dl = 1;
+ break;
+ case 0x40:
+ info(udev, "profile 0x%02x media_bd\n", cur_profile);
+ cd_media = 1;
+ cd_media_bd = 1;
+ break;
+ case 0x41:
+ case 0x42:
+ info(udev, "profile 0x%02x media_bd_r\n", cur_profile);
+ cd_media = 1;
+ cd_media_bd_r = 1;
+ break;
+ case 0x43:
+ info(udev, "profile 0x%02x media_bd_re\n", cur_profile);
+ cd_media = 1;
+ cd_media_bd_re = 1;
+ break;
+ case 0x50:
+ info(udev, "profile 0x%02x media_hddvd\n", cur_profile);
+ cd_media = 1;
+ cd_media_hddvd = 1;
+ break;
+ case 0x51:
+ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile);
+ cd_media = 1;
+ cd_media_hddvd_r = 1;
+ break;
+ case 0x52:
+ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile);
+ cd_media = 1;
+ cd_media_hddvd_rw = 1;
+ break;
+ default:
+ info(udev, "profile 0x%02x <ignored>\n", cur_profile);
+ break;
+ }
+}
+
static int feature_profiles(struct udev *udev, const unsigned char *profiles, size_t size)
{
unsigned int i;
@@ -350,6 +459,7 @@ static int feature_profiles(struct udev *udev, const unsigned char *profiles, si
return 0;
}
+/* returns 0 if media was detected */
static int cd_profiles_old_mmc(struct udev *udev, int fd)
{
struct scsi_cmd sc;
@@ -389,6 +499,7 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd)
return 0;
}
+/* returns 0 if media was detected */
static int cd_profiles(struct udev *udev, int fd)
{
struct scsi_cmd sc;
@@ -397,6 +508,9 @@ static int cd_profiles(struct udev *udev, int fd)
unsigned int len;
unsigned int i;
int err;
+ int ret;
+
+ ret = -1;
/* First query the current profile */
scsi_cmd_init(udev, &sc, features, sizeof(features));
@@ -410,126 +524,20 @@ static int cd_profiles(struct udev *udev, int fd)
if (SK(err) == 0x5 && ASC(err) == 0x20) {
info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n");
info(udev, "trying to work around the problem\n");
- return cd_profiles_old_mmc(udev, fd);
+ ret = cd_profiles_old_mmc(udev, fd);
}
- return -1;
+ goto out;
}
cur_profile = features[6] << 8 | features[7];
if (cur_profile > 0) {
info(udev, "current profile 0x%02x\n", cur_profile);
+ feature_profile_media (udev, cur_profile);
+ ret = 0; /* we have media */
} else {
info(udev, "no current profile, assuming no media\n");
- return -1;
}
- switch (cur_profile) {
- case 0x03:
- case 0x04:
- case 0x05:
- info(udev, "profile 0x%02x \n", cur_profile);
- cd_media = 1;
- cd_media_mo = 1;
- break;
- case 0x08:
- info(udev, "profile 0x%02x media_cd_rom\n", cur_profile);
- cd_media = 1;
- cd_media_cd_rom = 1;
- break;
- case 0x09:
- info(udev, "profile 0x%02x media_cd_r\n", cur_profile);
- cd_media = 1;
- cd_media_cd_r = 1;
- break;
- case 0x0a:
- info(udev, "profile 0x%02x media_cd_rw\n", cur_profile);
- cd_media = 1;
- cd_media_cd_rw = 1;
- break;
- case 0x10:
- info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_rom = 1;
- break;
- case 0x11:
- info(udev, "profile 0x%02x media_dvd_r\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_r = 1;
- break;
- case 0x12:
- info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_ram = 1;
- break;
- case 0x13:
- info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_rw = 1;
- cd_media_dvd_rw_ro = 1;
- break;
- case 0x14:
- info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_rw = 1;
- cd_media_dvd_rw_seq = 1;
- break;
- case 0x1B:
- info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_plus_r = 1;
- break;
- case 0x1A:
- info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_plus_rw = 1;
- break;
- case 0x2A:
- info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_plus_rw_dl = 1;
- break;
- case 0x2B:
- info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile);
- cd_media = 1;
- cd_media_dvd_plus_r_dl = 1;
- break;
- case 0x40:
- info(udev, "profile 0x%02x media_bd\n", cur_profile);
- cd_media = 1;
- cd_media_bd = 1;
- break;
- case 0x41:
- case 0x42:
- info(udev, "profile 0x%02x media_bd_r\n", cur_profile);
- cd_media = 1;
- cd_media_bd_r = 1;
- break;
- case 0x43:
- info(udev, "profile 0x%02x media_bd_re\n", cur_profile);
- cd_media = 1;
- cd_media_bd_re = 1;
- break;
- case 0x50:
- info(udev, "profile 0x%02x media_hddvd\n", cur_profile);
- cd_media = 1;
- cd_media_hddvd = 1;
- break;
- case 0x51:
- info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile);
- cd_media = 1;
- cd_media_hddvd_r = 1;
- break;
- case 0x52:
- info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile);
- cd_media = 1;
- cd_media_hddvd_rw = 1;
- break;
- default:
- info(udev, "profile 0x%02x <ignored>\n", cur_profile);
- break;
- }
-
-
len = features[0] << 24 | features[1] << 16 | features[2] << 8 | features[3];
info(udev, "GET CONFIGURATION: size of features buffer 0x%04x\n", len);
@@ -577,8 +585,8 @@ static int cd_profiles(struct udev *udev, int fd)
break;
}
}
-
- return 0;
+out:
+ return ret;
}
static int cd_media_info(struct udev *udev, int fd)
@@ -905,9 +913,12 @@ int main(int argc, char *argv[])
goto print;
/* read drive and possibly current profile */
- if (cd_profiles(udev, fd) < 0)
+ if (cd_profiles(udev, fd) != 0)
goto print;
+ /* at this point we are guaranteed to have media in the
+ * drive - find out more about it */
+
/* get session/track info */
cd_media_toc(udev, fd);

View file

@ -0,0 +1,65 @@
From 00fc377e7a6b1997db346c8de51cbf05cad48376 Mon Sep 17 00:00:00 2001
From: Paul Fox <pgf@laptop.org>
Date: Mon, 22 Aug 2011 06:39:06 +0200
Subject: [PATCH] keymap: update the OLPC keymap for correct function key
behavior
New mappings were needed when the mechanical keyboard was
introduced, and GNOME was made a peer to the sugar desktop.
see http://lists.laptop.org/pipermail/devel/2010-July/029384.html
---
extras/keymap/keymaps/olpc-xo | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/extras/keymap/keymaps/olpc-xo b/extras/keymap/keymaps/olpc-xo
index 7fe0662..34434a1 100644
--- a/extras/keymap/keymaps/olpc-xo
+++ b/extras/keymap/keymaps/olpc-xo
@@ -2,18 +2,32 @@
0x81 fn_esc
0xF9 camera
0xF8 sound # Fn-CAMERA = Mic
-0xBB fn_f1
-0xBC fn_f2
-0xBD fn_f3
-0xBE fn_f4
-0xBF fn_f5
-0xC0 fn_f6
-0xC1 fn_f7
-0xC2 fn_f8
-0xC3 fn_f9
-0xC4 fn_f10
-0xD7 fn_f11
-0xD8 fn_f12
+
+
+# Function key mappings, as per
+# http://dev.laptop.org/ticket/10213#comment:20
+#
+# Unmodified F1-F8 produce F1-F8, so no remap necessary.
+# Unmodified F9-F12 control brightness and volume.
+0x43 brightnessdown
+0x44 brightnessup
+0x57 volumedown
+0x58 volumeup
+
+# fn-modified fkeys all produce the unmodified version of the key.
+0xBB f1
+0xBC f2
+0xBD f3
+0xBE f4
+0xBF f5
+0xC0 f6
+0xC1 f7
+0xC2 f8
+0xC3 f9
+0xC4 f10
+0xD7 f11
+0xD8 f12
+
# Using F13-F21 for the .5 F keys right now.
0xF7 f13
--
1.7.4.4

20
udev-pda-acl.patch Normal file
View file

@ -0,0 +1,20 @@
commit d69207c3f20f0af2a5e510515ae5473f4fe54476
Author: Harald Hoyer <harald@redhat.com>
Date: Fri Nov 12 15:44:34 2010 +0100
70-acl.rules: add ACLs for ID_PDA devices
diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules
index c7134bc..66375de 100644
--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -47,6 +47,9 @@ SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl"
# smart-card readers
ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl"
+# PDA devices
+ENV{ID_PDA}=="*?", TAG+="udev-acl"
+
# joysticks
SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl"

View file

@ -25,7 +25,7 @@ case "$1" in
[ -w /var/lock/subsys ] || exit 4
STRING=$"Retrigger failed udev events"
echo -n $STRING
/sbin/udevadm trigger --type=failed
/sbin/udevadm trigger --type=failed --action=add
success "$STRING"
echo

17
udev-qemu-cdrom.patch Normal file
View file

@ -0,0 +1,17 @@
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 2bea2e4..7fe6e4c 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -522,7 +522,11 @@ static int cd_media_info(struct udev *udev, int fd)
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- return -1;
+ if (ASC(err)==0x20 && ASCQ(err) == 0) {
+ cd_media = 1;
+ return 0;
+ }
+ return -1;
};
cd_media = 1;

24
udev-ressize.patch Normal file
View file

@ -0,0 +1,24 @@
commit 851dd4ddc5aeb1ee517145d9e3334c2017595321
Author: Harald Hoyer <harald@redhat.com>
Date: Fri Nov 12 14:39:14 2010 +0100
udev-rules.c: change import property buffer to 16384 bytes
import_program_into_properties() should have the same line length as
import_file_into_properties()
see also https://bugzilla.redhat.com/show_bug.cgi?id=652318
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 52f121c..ab7b6ae 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -751,7 +751,7 @@ static int import_program_into_properties(struct udev_device *dev, const char *p
{
struct udev *udev = udev_device_get_udev(dev);
char **envp;
- char result[4096];
+ char result[UTIL_LINE_SIZE];
size_t reslen;
char *line;

View file

@ -0,0 +1,45 @@
From 4ace8a43ac2cbbd4d6f5c29fc461c3caa8f8545b Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 15 Feb 2011 17:24:32 +0100
Subject: [PATCH] v4l_id: kill the v4l1 ioctl
Recent kernels do not have v4l1 anymore.
---
extras/v4l_id/v4l_id.c | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c
index d530a6d..f3fc648 100644
--- a/extras/v4l_id/v4l_id.c
+++ b/extras/v4l_id/v4l_id.c
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include <linux/videodev.h>
#include <linux/videodev2.h>
int main (int argc, char *argv[])
@@ -82,19 +81,6 @@ int main (int argc, char *argv[])
if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0)
printf("radio:");
printf("\n");
- } else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
- printf("ID_V4L_VERSION=1\n");
- printf("ID_V4L_PRODUCT=%s\n", v1cap.name);
- printf("ID_V4L_CAPABILITIES=:");
- if ((v1cap.type & VID_TYPE_CAPTURE) > 0)
- printf("capture:");
- if ((v1cap.type & VID_TYPE_OVERLAY) > 0)
- printf("video_overlay:");
- if (v1cap.audios > 0)
- printf("audio:");
- if ((v1cap.type & VID_TYPE_TUNER) > 0)
- printf("tuner:");
- printf("\n");
}
close (fd);
--
1.7.4.4

View file

@ -0,0 +1,24 @@
From 89284ddac413d376fc3b56f742daaf1b9bc85bba Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 15 Feb 2011 17:27:29 +0100
Subject: [PATCH] v4l_id: remove left-over variable
---
extras/v4l_id/v4l_id.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c
index f3fc648..21cb328 100644
--- a/extras/v4l_id/v4l_id.c
+++ b/extras/v4l_id/v4l_id.c
@@ -38,7 +38,6 @@ int main (int argc, char *argv[])
};
int fd;
char *device;
- struct video_capability v1cap;
struct v4l2_capability v2cap;
while (1) {
--
1.7.4.4

138
udev.spec
View file

@ -6,8 +6,8 @@
Summary: A rule-based device node and kernel event manager
Name: udev
Version: 160
Release: 8%{?dist}
Version: 161
Release: 10%{?dist}
License: GPLv2+
Group: System Environment/Base
Provides: udev-persistent = %{version}-%{release}
@ -17,6 +17,46 @@ Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.t
Source1: start_udev
Source2: udev-post.init
Patch2: 0002-Add-keymap-for-Lenovo-IdeaPad-S10-3.patch
Patch4: 0004-init-update-systemd-service-files.patch
Patch5: 0005-init-update-systemd-service-files.patch
Patch6: 0006-udev-acl-do-not-mistake-all-SCSI-processor-devices-f.patch
Patch7: 0007-init-add-udev-to-description-in-systemd-service-file.patch
Patch8: 0008-udevd-add-pid-to-kmsg-logs.patch
Patch9: 0009-init-edit-systemd-service-descriptions.patch
Patch11: 0011-udev-7-Point-out-required-extension-and-remove-some-.patch
Patch12: 0012-keymap-Add-Onkyo-PC.patch
Patch13: 0013-keymap-Add-HP-G60.patch
Patch14: 0014-udevd-remove-unneeded-credential-passing-from-init_n.patch
Patch15: 0015-Add-support-for-oom_score_adj.patch
Patch16: 0016-keymap-Fix-Sony-VAIO-VGN-SZ2HP-B.patch
Patch17: 0017-udev-7-manpage-Fix-description-of-attr.patch
Patch18: 0018-gudev-fix-crash-if-netlink-is-not-available.patch
Patch19: 0019-keymap-Fix-Acer-TravelMate-4720.patch
Patch22: 0022-set-SELinux-context-on-add-but-not-on-change-events.patch
Patch23: 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch
Patch101: 0101-cdrom_id-Add-media-status-debugging.patch
Patch102: 0102-cdrom_id-Drop-MEDIA_SESSION_NEXT-for-DVD-RW-RO.patch
Patch103: 0103-cdrom_id-Fix-DVD-RW-media-detection.patch
Patch104: 0104-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch
Patch105: 0105-cdrom_id-Try-reading-the-medium-if-all-MMC-commands-.patch
Patch106: 0106-Revert-cdrom_id-Try-reading-the-medium-if-all-MMC-co.patch
Patch107: 0107-cdrom_id-Fall-back-to-CDROM_DRIVE_STATUS-if-all-MMC-.patch
Patch108: 0108-cdrom_id-Don-t-read-beyond-last-track-in-TOC.patch
Patch109: 0109-cdrom_id-request-the-drive-profile-features-with-a-d.patch
Patch110: 0001-keymap-Add-force-release-for-HP-touchpad-off.patch
Patch111: 0001-extras-keymap-Make-touchpad-buttons-consistent.patch
Patch1000: udev-ressize.patch
Patch1001: udev-pda-acl.patch
Patch1002: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch
Patch1003: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch
Patch1004: udev-olpc-keymap-update.patch
Patch1005: udev-v4l-compile-fix.patch
Patch1006: udev-v4l-compile-fix2.patch
ExclusiveOS: Linux
URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -113,6 +153,43 @@ glib-based applications using libudev functionality.
%prep
%setup -q
%patch2 -p1 -b .git2
%patch4 -p1 -b .git4
%patch5 -p1 -b .git5
%patch6 -p1 -b .git6
%patch7 -p1 -b .git7
%patch8 -p1 -b .git8
%patch9 -p1 -b .git9
%patch11 -p1 -b .git11
%patch12 -p1 -b .git12
%patch13 -p1 -b .git13
%patch14 -p1 -b .git14
%patch15 -p1 -b .git15
%patch16 -p1 -b .git16
%patch17 -p1 -b .git17
%patch18 -p1 -b .git18
%patch19 -p1 -b .git19
%patch22 -p1 -b .git22
%patch23 -p1 -b .git23
%patch101 -p1 -b .git101
%patch102 -p1 -b .git102
%patch103 -p1 -b .git103
%patch104 -p1 -b .git104
%patch105 -p1 -b .git105
%patch106 -p1 -b .git106
%patch107 -p1 -b .git107
%patch108 -p1 -b .git108
%patch109 -p1 -b .git109
%patch110 -p1 -b .git110
%patch111 -p1 -b .git111
%patch1000 -p1 -b .ressize
%patch1001 -p1 -b .pda
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch1006 -p1
%build
libtoolize -f -c
@ -190,6 +267,7 @@ exit 0
getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || :
getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || :
getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
getent group floppy >/dev/null || /usr/sbin/groupadd -g 19 floppy || :
# kill daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root; then
@ -209,6 +287,10 @@ if test -f /proc/1/exe -a -d /proc/1/root; then
fi
exit 0
%triggerpostun -- udev < 161-7
[ -c /dev/systty ] && ln -fs tty0 /dev/systty
:
%post
# start daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root; then
@ -348,6 +430,58 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0*
%changelog
* Mon Aug 29 2011 Daniel Drake <dsd@laptop.org> 161-10
- Update OLPC XO keymap
- Fix compilation on new linux-headers
* Wed Mar 23 2011 Harald Hoyer <harald@redhat.com> 161-9
- add ACLs for harmony remote controls
Resolves: rhbz#559412
- fixed CDROM profile handling
* Thu Nov 25 2010 Bastien Nocera <bnocera@redhat.com> 161-8
- Add patches to fix touchpad toggle key handling
* Thu Nov 18 2010 Harald Hoyer <harald@redhat.com> 161-7
- fix /dev/systty
Resolves: rhbz#654935
* Fri Nov 12 2010 Harald Hoyer <harald@redhat.com> 161-6
- add ACLs for PDA devices
Resolves: rhbz#642435
* Fri Nov 12 2010 Harald Hoyer <harald@redhat.com> 161-5
- enlarged the import buffer to fix the ressize bugs
Resolves: rhbz#652318
* Thu Oct 07 2010 Harald Hoyer <harald@redhat.com> 161-4
- more cdrom_id patches
Resolves: rhbz#637495
* Tue Oct 05 2010 Harald Hoyer <harald@redhat.com> 161-3
- add cdrom_id patch for pre-MMC2 drives, which do not report
profiles
Resolves: rhbz#637495
* Wed Sep 01 2010 Harald Hoyer <harald@redhat.com> 161-2
- bugfixes for systemd service files
- bugfix for selinux labeling
- bugfixes for cdrom_id
* Tue Aug 17 2010 Harald Hoyer <harald@redhat.com> 161-1
- udev-161 with an upstream quirk for the qemu cdrom and
more cdrom handling bugfixes
Resolves: rhbz#609049 rhbz#624286
- added floppy group
Resolves: rhbz#620814
* Fri Aug 06 2010 Harald Hoyer <harald@redhat.com> 160-9
- added quirk to cdrom_id, to boot from qemu
Resolves: rhbz#609049
- fix console switching and ACLs
Resolves: rhbz#608712
- minor bugfixes
* Tue Jul 20 2010 Harald Hoyer <harald@redhat.com> 160-8
- make loop block device again