pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/hal



Module Name:    pkgsrc
Committed By:   jmcneill
Date:           Sat May 19 13:25:36 UTC 2018

Modified Files:
        pkgsrc/sysutils/hal: Makefile
        pkgsrc/sysutils/hal/files/hald-netbsd: devinfo.c devinfo.h
            devinfo_misc.c drvctl.c hotplug.c osspec.c

Log Message:
On NetBSD/arm with FDT, the root device is "armfdt0" instead of "mainbus0".
Bump pkg revision.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 pkgsrc/sysutils/hal/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h \
    pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/hal/Makefile
diff -u pkgsrc/sysutils/hal/Makefile:1.79 pkgsrc/sysutils/hal/Makefile:1.80
--- pkgsrc/sysutils/hal/Makefile:1.79   Tue Oct 10 13:51:21 2017
+++ pkgsrc/sysutils/hal/Makefile        Sat May 19 13:25:36 2018
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.79 2017/10/10 13:51:21 jperkin Exp $
+# $NetBSD: Makefile,v 1.80 2018/05/19 13:25:36 jmcneill Exp $
 
 DISTNAME=              hal-0.5.14
-PKGREVISION=           18
+PKGREVISION=           19
 CATEGORIES=            sysutils
 MASTER_SITES=          http://hal.freedesktop.org/releases/
 EXTRACT_SUFX=          .tar.bz2

Index: pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c:1.5 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c:1.6
--- pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c:1.5 Thu Dec 11 15:05:01 2008
+++ pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.c     Sat May 19 13:25:36 2018
@@ -48,6 +48,21 @@ devinfo_add(HalDevice *parent, gchar *na
        devinfo_add_subtree (parent, name, TRUE);
 }
 
+gboolean
+devinfo_probe(HalDevice *parent, gchar *name)
+{
+       struct devlistargs laa;
+
+       if (drvctl_list (name, &laa) == -1) {
+               HAL_INFO (("devinfo_probe: no %s device found", name));
+               return FALSE;
+       }
+
+       free (laa.l_childname);
+
+       return TRUE;
+}
+
 void
 devinfo_add_subtree(HalDevice *parent, const char *devnode, gboolean is_root)
 {
@@ -87,7 +102,7 @@ devinfo_set_default_properties (HalDevic
                char *pdevice = hal_device_property_get_string (parent, "netbsd.device");
                if (pdevice) {
                        gchar *path;
-                       if (strcmp (pdevice, "mainbus0") == 0)
+                       if (strcmp (pdevice, "mainbus0") == 0 || strcmp (pdevice, "armfdt0") == 0)
                                pdevice = "computer";
                        path = g_strdup_printf ("/org/freedesktop/Hal/devices/%s", pdevice);
                        hal_device_property_set_string (d, "info.parent", path);
@@ -98,7 +113,7 @@ devinfo_set_default_properties (HalDevic
                char *pdevice = pdevnode;
                if (drvctl_find_parent (devnode, pdevnode) == TRUE) {
                        gchar *path;
-                       if (strcmp (pdevnode, "mainbus0") == 0)
+                       if (strcmp (pdevnode, "mainbus0") == 0 || strcmp (pdevnode, "armfdt0") == 0)
                                pdevice = "computer";
                        path = g_strdup_printf ("/org/freedesktop/Hal/devices/%s", pdevice);
                        hal_device_property_set_string (d, "info.parent", path);

Index: pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h:1.1 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h:1.2
--- pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h:1.1 Tue Nov 25 23:10:23 2008
+++ pkgsrc/sysutils/hal/files/hald-netbsd/devinfo.h     Sat May 19 13:25:36 2018
@@ -52,6 +52,7 @@ typedef struct DevinfoDevHandler_s
 #define        NELEM(a)        (sizeof (a) / sizeof (*(a)))
 
 void devinfo_add (HalDevice *parent, gchar *path);
+gboolean devinfo_probe (HalDevice *parent, gchar *path);
 HalDevice *devinfo_add_node(HalDevice *parent, const char *devnode);
 void devinfo_set_default_properties (HalDevice *d, HalDevice *parent, const char *devnode, char *devfs_path);
 void devinfo_callouts_preprobing_done (HalDevice *d, gpointer userdata1, gpointer userdata2);
Index: pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c:1.1 pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c:1.2
--- pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c:1.1 Tue Nov 25 23:10:23 2008
+++ pkgsrc/sysutils/hal/files/hald-netbsd/hotplug.c     Sat May 19 13:25:36 2018
@@ -89,7 +89,7 @@ hotplug_event_begin_devfs_add (HotplugEv
 
        /* only root node is allowed to be orphan */
        if (parent == NULL) {
-               if (strcmp(hotplug_event->un.devfs.devfs_path, "mainbus0") != 0) {
+               if (strcmp(hotplug_event->un.devfs.devfs_path, "mainbus0") != 0 && strcmp(hotplug_event->un.devfs.devfs_path, "armfdt0") != 0) {
                        HAL_ERROR (("Parent is NULL devfs_path=%s parent_udi=%s", hotplug_event->un.devfs.devfs_path, parent_udi ? parent_udi : "<null>"));
                        hotplug_event_end ((void *) hotplug_event);
                        return;

Index: pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c:1.6 pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c:1.7
--- pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c:1.6    Sun Jan 25 18:46:09 2015
+++ pkgsrc/sysutils/hal/files/hald-netbsd/devinfo_misc.c        Sat May 19 13:25:36 2018
@@ -66,7 +66,7 @@ devinfo_computer_add(HalDevice *parent, 
        char acpi_supported_states[20];
        size_t len = sizeof(acpi_supported_states);
 
-       if (strcmp (devnode, "mainbus0") != 0) {
+       if (strcmp (devnode, "mainbus0") != 0 && strcmp (devnode, "armfdt0") != 0) {
                return (NULL);
        }
 

Index: pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c:1.4 pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c:1.5
--- pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c:1.4  Sun Jan 25 18:46:09 2015
+++ pkgsrc/sysutils/hal/files/hald-netbsd/drvctl.c      Sat May 19 13:25:36 2018
@@ -179,6 +179,7 @@ drvctl_list(const gchar *name, struct de
        }
        if (children != laa->l_children)
                HAL_WARNING (("DRVLISTDEV/3 expected %d children, got %d", children, laa->l_childname));
+       return 0;
 }
 
 gboolean
@@ -252,7 +253,14 @@ drvctl_find_device_with_child(const gcha
 gboolean
 drvctl_find_parent(const gchar *devnode, char *parent)
 {
-       return drvctl_find_device_with_child("mainbus0", devnode, parent);
+       gboolean ret;
+
+       ret = drvctl_find_device_with_child("mainbus0", devnode, parent);
+       if (ret == FALSE) {
+               ret = drvctl_find_device_with_child("armfdt0", devnode, parent);
+       }
+
+       return ret;
 }
 
 #if 0

Index: pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c
diff -u pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c:1.3 pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c:1.4
--- pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c:1.3  Mon Dec  1 02:02:33 2008
+++ pkgsrc/sysutils/hal/files/hald-netbsd/osspec.c      Sat May 19 13:25:36 2018
@@ -72,7 +72,12 @@ void 
 osspec_probe (void)
 {
        /* add entire device tree */
-       devinfo_add (NULL, "mainbus0");
+       if (devinfo_probe (NULL, "mainbus0") == TRUE) {
+               devinfo_add (NULL, "mainbus0");
+       }
+       if (devinfo_probe (NULL, "armfdt0") == TRUE) {
+               devinfo_add (NULL, "armfdt0");
+       }
 
        /* start processing events */
        hotplug_event_process_queue ();



Home | Main Index | Thread Index | Old Index