~ubuntu-branches/ubuntu/oneiric/hal/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/20-ignore-temporary-cryptsetup-devices.patch

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-02-14 11:45:59 UTC
  • Revision ID: james.westby@ubuntu.com-20110214114559-g5ti3fxottbysekt
Tags: 0.5.14-5+svn1
Upload current Debian svn head to fix FTBFS.

* Add 00upstream_video4linux_check.patch: Do not build
  hald-probe-video4linux if v4l1 is not available. (LP: #721399)
* Refresh 99-autoreconf.patch for above.
* 45-fix-libusb-detection.patch: Unfuzz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Subject: [PATCH] HAL: Ignore internal DM devices with new DM udev rules
 
2
From: Milan Broz <mbroz@redhat.com>
 
3
Date: Tue, 13 Jul 2010 14:08:14 +0200
 
4
 
 
5
With new device-mapper udev rules are /dev/mapper/* symlinks
 
6
to basic device name /dev/dm-X.
 
7
(Change requested by udev upstream.)
 
8
 
 
9
This change breaks temporary-cryptsetup workaround inside hal.
 
10
 
 
11
With new dm-udev rules (uncluded since device-mapper 1.02.39)
 
12
there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable
 
13
which controls that scan should be ignored for this device
 
14
(it is set for all internal devices, including temporary cryptsetup,
 
15
internal parts of lvm devices etc.)
 
16
 
 
17
Ignore device if this flag is set.
 
18
 
 
19
See bugs
 
20
https://bugzilla.redhat.com/show_bug.cgi?id=613909
 
21
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286
 
22
 
 
23
Signed-off-by: Milan Broz <mbroz@redhat.com>
 
24
---
 
25
 hald/linux/osspec.c |    5 +++++
 
26
 1 files changed, 5 insertions(+), 0 deletions(-)
 
27
 
 
28
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
 
29
index a8233fd..6d616bc 100644
 
30
--- a/hald/linux/osspec.c
 
31
+++ b/hald/linux/osspec.c
 
32
@@ -215,6 +215,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
 
33
                                g_free (str);
 
34
                        }
 
35
                        g_free (dstr);
 
36
+               } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
 
37
+                       if (strtoul(&key[33], NULL, 10) == 1) {
 
38
+                               HAL_INFO (("ignoring device requested by DM udev rules"));
 
39
+                               goto invalid;
 
40
+                       }
 
41
                }
 
42
        }
 
43