[Pkg-utopia-commits] r260 - in packages/unstable/hal/debian: .
patches
Sjoerd Simons
sjoerd at costa.debian.org
Mon Aug 1 22:02:31 UTC 2005
Author: sjoerd
Date: 2005-08-01 22:02:30 +0000 (Mon, 01 Aug 2005)
New Revision: 260
Added:
packages/unstable/hal/debian/patches/udev_fix.patch
Modified:
packages/unstable/hal/debian/changelog
Log:
fix coldplugging with newer udev
Modified: packages/unstable/hal/debian/changelog
===================================================================
--- packages/unstable/hal/debian/changelog 2005-07-05 11:25:36 UTC (rev 259)
+++ packages/unstable/hal/debian/changelog 2005-08-01 22:02:30 UTC (rev 260)
@@ -1,3 +1,11 @@
+hal (0.4.8-4) unstable; urgency=low
+
+ * debian/patches/udev_fix.patch
+ + Correctly coldplug block devices with the latest udev releases
+ (Closes: #318313)
+
+ -- Sjoerd Simons <sjoerd at debian.org> Mon, 1 Aug 2005 23:38:46 +0200
+
hal (0.4.8-3) unstable; urgency=low
* debian/patches/dvd_plus_r_rw_typo.diff
Added: packages/unstable/hal/debian/patches/udev_fix.patch
===================================================================
--- packages/unstable/hal/debian/patches/udev_fix.patch 2005-07-05 11:25:36 UTC (rev 259)
+++ packages/unstable/hal/debian/patches/udev_fix.patch 2005-08-01 22:02:30 UTC (rev 260)
@@ -0,0 +1,29 @@
+diff -ruN hal-0.4.8-old/hald/linux/common.c hal-0.4.8/hald/linux/common.c
+--- hal-0.4.8-old/hald/linux/common.c 2004-12-01 04:39:01.000000000 +0100
++++ hal-0.4.8/hald/linux/common.c 2005-08-01 23:38:23.000000000 +0200
+@@ -740,8 +740,24 @@
+ }
+
+ if (udev_exitcode != 0) {
++ char *pos;
++ struct stat statbuf;
++ pos = strrchr(sysfs_path_trunc, '/');
++ if (pos == NULL)
++ goto no_device;
++
++ strncpy(dev_file, "/dev", dev_file_length);
++ g_strlcat(dev_file, pos, dev_file_length);
++ if (stat (dev_file, &statbuf))
++ goto no_device;
++
++ if (!S_ISBLK(statbuf.st_mode) && !S_ISCHR(statbuf.st_mode))
++ goto no_device;
++ return TRUE;
++
++no_device:
+ HAL_ERROR (("%s returned %d for %s", udevinfo_path (),
+- udev_exitcode, sysfs_path_trunc));
++ udev_exitcode, sysfs_path_trunc));
+ return FALSE;
+ }
+
More information about the Pkg-utopia-commits
mailing list