hal: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Wed Jul 29 06:21:51 PDT 2009


 hald/linux/blockdev.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 141ca8cd7b768ddefa1bfaa563cbef4337e32b7c
Author: Martin Poole <mpoole at redhat.com>
Date:   Wed Jul 29 14:20:45 2009 +0100

    Fix a segfault in the mdraid code -- see rh#507782 for more info
    
    Signed-off-by: Richard Hughes <richard at hughsie.com>

diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
index 69ba026..7b47431 100644
--- a/hald/linux/blockdev.c
+++ b/hald/linux/blockdev.c
@@ -878,7 +878,7 @@ error:
 }
 
 
-void
+
 hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_file, gboolean is_partition,
 				  HalDevice *parent, void *end_token)
 {
@@ -893,6 +893,7 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
         gboolean is_md_device;
 	gboolean is_cciss_device;
         int md_number;
+	char tc;
 
 	is_device_mapper = FALSE;
         is_fakevolume = FALSE;
@@ -911,7 +912,7 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
 		HAL_INFO (("Handling %s as fakevolume - sysfs_path_real=%s", device_file, sysfs_path_real));
 		is_fakevolume = TRUE;
 		sysfs_path_real = hal_util_get_parent_path (sysfs_path);
-        } else if (sscanf (hal_util_get_last_element (sysfs_path), "md%d", &md_number) == 1) {
+        } else if (sscanf (hal_util_get_last_element (sysfs_path), "md%d%c", &md_number, &tc) == 1) {
 		HAL_INFO (("Handling %s as MD device", device_file));
                 is_md_device = TRUE;
 		sysfs_path_real = g_strdup (sysfs_path);


More information about the hal-commit mailing list