summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-11-25 18:57:01 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-11-25 18:57:01 +0000
commitc7c075e57fa0d89b1ef47159994062d566edcfe6 (patch)
tree513ebb9776f6fdabd3fa9f88f3b317f44e61cc85 /sys-fs/udev/files
parentVersion bump. Remove old. (diff)
downloadgentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.tar.gz
gentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.tar.bz2
gentoo-2-c7c075e57fa0d89b1ef47159994062d566edcfe6.zip
Add missing pieces to kernel-compat rules. Add patch to not warn about usage of PHYSDEV* in rules doing WAIT_FOR.
(Portage version: 2.1.6_rc1/cvs/Linux 2.6.27-gentoo-r1 i686)
Diffstat (limited to 'sys-fs/udev/files')
-rw-r--r--sys-fs/udev/files/udev-133-rules-update.diff70
-rw-r--r--sys-fs/udev/files/udev-133-silence-physdev-warnings.diff42
2 files changed, 112 insertions, 0 deletions
diff --git a/sys-fs/udev/files/udev-133-rules-update.diff b/sys-fs/udev/files/udev-133-rules-update.diff
new file mode 100644
index 000000000000..2861a83225f6
--- /dev/null
+++ b/sys-fs/udev/files/udev-133-rules-update.diff
@@ -0,0 +1,70 @@
+diff --git a/rules/gentoo/30-kernel-compat.rules b/rules/gentoo/30-kernel-compat.rules
+index 1f767df..d07e7fa 100644
+--- a/rules/gentoo/30-kernel-compat.rules
++++ b/rules/gentoo/30-kernel-compat.rules
+@@ -1,9 +1,17 @@
+ # do not edit this file, it will be overwritten on update
+
+-ACTION!="add", GOTO="kernel_compat_end"
++ACTION!="add|change", GOTO="kernel_compat_end"
++
++#
++# rules to workaround bad sysfs timing
++#
++
++ACTION!="add", GOTO="kernel_compat_wait_end"
+
+ # workarounds needed to synchronize with sysfs
++# needed for kernels < v2.6.18-rc1
+ DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
++SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
+
+ # needed for kernels <2.6.16
+ SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+@@ -11,13 +19,29 @@ SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+ # needed for kernels <2.6.17
+ SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
++LABEL="kernel_compat_wait_end"
+
++#
++# naming device rules
++#
+
++# old style usb sysfs devices
+ # needed for kernels <2.6.22
+ SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664"
+
++# /sys/class/block will export this
++# needed for kernels <2.6.25-rc1
++SUBSYSTEM!="block", GOTO="block_devtype_end"
++ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk"
++ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition"
++LABEL="block_devtype_end"
+
+
++#
++# module loading rules
++#
++ACTION!="add", GOTO="kernel_compat_end"
++
+ # this driver is broken and should not be loaded automatically
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962
+ # needed for kernels <2.6.21
+@@ -26,6 +50,11 @@ SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}=""
+ # No need for more code, as MODALIAS is present
+ ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"
+
++# needed for kernel <2.6.27-rc5
++# acpi will do on newer kernels
++SUBSYSTEM=="pnp", DRIVER!="?*", \
++ RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
++
+ # needed for kernels <2.6.22
+ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+@@ -44,4 +73,3 @@ SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+ LABEL="kernel_compat_end"
+
+-
diff --git a/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff b/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff
new file mode 100644
index 000000000000..1ae1c56b79b2
--- /dev/null
+++ b/sys-fs/udev/files/udev-133-silence-physdev-warnings.diff
@@ -0,0 +1,42 @@
+commit ae2d346642aee4fab33c88708627bcf5b0cb317d
+Author: Kay Sievers <kay.sievers@vrfy.org>
+Date: Mon Nov 24 21:24:04 2008 +0100
+
+ silence PHYSDEV* warning for WAIT_FOR* rules
+
+diff --git a/udev/udev-rules.c b/udev/udev-rules.c
+index df9fc78..afd2e88 100644
+--- a/udev/udev-rules.c
++++ b/udev/udev-rules.c
+@@ -1135,6 +1135,7 @@ static int add_rule(struct udev_rules *rules, char *line,
+ char *linepos;
+ char *attr;
+ int physdev = 0;
++ int waitfor = 0;
+ struct rule_tmp rule_tmp;
+
+ memset(&rule_tmp, 0x00, sizeof(struct rule_tmp));
+@@ -1395,6 +1396,7 @@ static int add_rule(struct udev_rules *rules, char *line,
+ if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
+ rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
+ valid = 1;
++ waitfor = 1;
+ continue;
+ }
+
+@@ -1544,11 +1546,11 @@ static int add_rule(struct udev_rules *rules, char *line,
+ err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno);
+ }
+
+- if (physdev)
+- err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, \n"
+- "please fix it in %s:%u", filename, lineno);
++ if (physdev && !waitfor)
++ err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, "
++ "please fix it in %s:%u\n", filename, lineno);
+
+- /* skip line if not any valid key was found */
++ /* skip line if no valid key was found */
+ if (!valid)
+ goto invalid;
+