Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144477082
D53992.1774880071.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
997 B
Referenced Files
None
Subscribers
None
D53992.1774880071.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D53992: ofw: Add ofw_bus_is_machine_compat()
Attached
Detach File
Event Timeline
Log In to Comment