Page MenuHomeFreeBSD

D53992.1774880071.diff
No OneTemporary

Size
997 B
Referenced Files
None
Subscribers
None

D53992.1774880071.diff

diff --git a/sys/dev/ofw/ofw_bus_subr.h b/sys/dev/ofw/ofw_bus_subr.h
--- a/sys/dev/ofw/ofw_bus_subr.h
+++ b/sys/dev/ofw/ofw_bus_subr.h
@@ -117,6 +117,9 @@
int ofw_bus_is_compatible_strict(device_t, const char *);
int ofw_bus_node_is_compatible(phandle_t, const char *);
+/* Check if machine (root node) is compatible */
+bool ofw_bus_is_machine_compatible(const char *);
+
/*
* Helper routine to search a list of compat properties. The table is
* terminated by an entry with a NULL compat-string pointer; a pointer to that
diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c
--- a/sys/dev/ofw/ofw_bus_subr.c
+++ b/sys/dev/ofw/ofw_bus_subr.c
@@ -298,6 +298,15 @@
return (0);
}
+bool
+ofw_bus_is_machine_compatible(const char *compat)
+{
+ phandle_t root;
+
+ root = OF_finddevice("/");
+ return (ofw_bus_node_is_compatible(root, compat) != 0);
+}
+
const struct ofw_compat_data *
ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data *compat)
{

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 30, 2:14 PM (12 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28230268
Default Alt Text
D53992.1774880071.diff (997 B)

Event Timeline