NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-i386/49604: hald aborts core
>Number: 49604
>Category: port-i386
>Synopsis: hald aborts core
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-i386-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 25 15:55:00 +0000 2015
>Originator: sergio lenzi
>Release: NetBSD 6.1.5_PATCH
>Organization:
http://www.k1.com.br
>Environment:
NetBSD netbsd61.homenet 6.1.5_PATCH NetBSD 6.1.5_PATCH (GENERIC) #0: Sat Jan 17 21:29:06 BRST 2015 root@z5000.lenzicasa:/usr/obj/sys/arch/i386/compile/GENERIC i386
>Description:
hald aborts core with --verbose=yes AND when you insert an unknown pen-drive in the system
>How-To-Repeat:
execute hald --daemon=no --verbose=yes
>Fix:
recode some portions of hald code...
patch follows
============================================================
diff -up hald/netbsd/devinfo_mass.c.orig hald/netbsd/devinfo_mass.c
--- hald/netbsd/devinfo_mass.c.orig 2015-01-24 23:13:19.000000000 -0200
+++ hald/netbsd/devinfo_mass.c 2015-01-24 23:17:04.000000000 -0200
@@ -230,7 +230,7 @@ devinfo_mass_add(HalDevice *parent, cons
}
if (gparent_devnode && strstr (gparent_devnode, "umass") == gparent_devnode)
hal_device_property_set_string (d, "storage.bus", "usb");
- else if (strstr (parent_devnode, "atabus") == parent_devnode)
+ else if (parent_devnode && strstr (parent_devnode, "atabus") == parent_devnode)
hal_device_property_set_string (d, "storage.bus", "ide");
else
hal_device_property_set_string (d, "storage.bus", "scsi");
diff -up hald/netbsd/devinfo_misc.c.orig hald/netbsd/devinfo_misc.c
--- hald/netbsd/devinfo_misc.c.orig 2015-01-24 22:53:54.000000000 -0200
+++ hald/netbsd/devinfo_misc.c 2015-01-24 22:53:56.000000000 -0200
@@ -137,12 +137,12 @@ devinfo_default_apply_quirks(HalDevice *
/* acpiacad(4) */
if (strncmp (devnode, "acpiacad", 8) == 0) {
- HAL_INFO (("%s: applying acpiacad quirks"));
+ HAL_INFO (("%s: applying acpiacad quirks",devnode));
hal_device_add_capability (d, "ac_adapter");
/* acpibat(4) */
} else if (strncmp (devnode, "acpibat", 7) == 0) {
- HAL_INFO (("%s: applying acpibat quirks"));
+ HAL_INFO (("%s: applying acpibat quirks",devnode));
hal_device_add_capability (d, "battery");
hal_device_property_set_string (d, "battery.type", "primary");
}
diff -up hald/netbsd/drvctl.c.orig hald/netbsd/drvctl.c
--- hald/netbsd/drvctl.c.orig 2015-01-24 22:53:54.000000000 -0200
+++ hald/netbsd/drvctl.c 2015-01-24 22:53:56.000000000 -0200
@@ -123,7 +123,7 @@ drvctl_dev_add(gchar *name)
parent = hal_device_store_match_key_value_string (
hald_get_gdl(), "netbsd.device", pdevnode);
if (parent == NULL)
- HAL_INFO (("dev_add: name=%s but netbsd.device=%s not found", pdevnode));
+ HAL_INFO (("dev_add: name=%s but netbsd.device=%s not found",name, pdevnode));
}
d = devinfo_add_node (parent, name);
@@ -245,7 +245,7 @@ drvctl_find_device_with_child(const gcha
if (laa.l_childname)
free(laa.l_childname);
- /* HAL_INFO (("%s: couldn't find device with child %s", curnode, devnode)); */
+ HAL_INFO (("%s: couldn't find device with child %s", curnode, devnode));
return FALSE;
}
[root@netbsd61 /usr/pkgsrc/sysutils/hal]# ^C
[root@netbsd61 /usr/pkgsrc/sysutils/hal]# cat patches/patch-lenzi
diff -up hald/netbsd/devinfo_mass.c.orig hald/netbsd/devinfo_mass.c
--- hald/netbsd/devinfo_mass.c.orig 2015-01-24 23:13:19.000000000 -0200
+++ hald/netbsd/devinfo_mass.c 2015-01-24 23:17:04.000000000 -0200
@@ -230,7 +230,7 @@ devinfo_mass_add(HalDevice *parent, cons
}
if (gparent_devnode && strstr (gparent_devnode, "umass") == gparent_devnode)
hal_device_property_set_string (d, "storage.bus", "usb");
- else if (strstr (parent_devnode, "atabus") == parent_devnode)
+ else if (parent_devnode && strstr (parent_devnode, "atabus") == parent_devnode)
hal_device_property_set_string (d, "storage.bus", "ide");
else
hal_device_property_set_string (d, "storage.bus", "scsi");
diff -up hald/netbsd/devinfo_misc.c.orig hald/netbsd/devinfo_misc.c
--- hald/netbsd/devinfo_misc.c.orig 2015-01-24 22:53:54.000000000 -0200
+++ hald/netbsd/devinfo_misc.c 2015-01-24 22:53:56.000000000 -0200
@@ -137,12 +137,12 @@ devinfo_default_apply_quirks(HalDevice *
/* acpiacad(4) */
if (strncmp (devnode, "acpiacad", 8) == 0) {
- HAL_INFO (("%s: applying acpiacad quirks"));
+ HAL_INFO (("%s: applying acpiacad quirks",devnode));
hal_device_add_capability (d, "ac_adapter");
/* acpibat(4) */
} else if (strncmp (devnode, "acpibat", 7) == 0) {
- HAL_INFO (("%s: applying acpibat quirks"));
+ HAL_INFO (("%s: applying acpibat quirks",devnode));
hal_device_add_capability (d, "battery");
hal_device_property_set_string (d, "battery.type", "primary");
}
diff -up hald/netbsd/drvctl.c.orig hald/netbsd/drvctl.c
--- hald/netbsd/drvctl.c.orig 2015-01-24 22:53:54.000000000 -0200
+++ hald/netbsd/drvctl.c 2015-01-24 22:53:56.000000000 -0200
@@ -123,7 +123,7 @@ drvctl_dev_add(gchar *name)
parent = hal_device_store_match_key_value_string (
hald_get_gdl(), "netbsd.device", pdevnode);
if (parent == NULL)
- HAL_INFO (("dev_add: name=%s but netbsd.device=%s not found", pdevnode));
+ HAL_INFO (("dev_add: name=%s but netbsd.device=%s not found",name, pdevnode));
}
d = devinfo_add_node (parent, name);
@@ -245,7 +245,7 @@ drvctl_find_device_with_child(const gcha
if (laa.l_childname)
free(laa.l_childname);
- /* HAL_INFO (("%s: couldn't find device with child %s", curnode, devnode)); */
+ HAL_INFO (("%s: couldn't find device with child %s", curnode, devnode));
return FALSE;
}
Home |
Main Index |
Thread Index |
Old Index