Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153841991
D56429.id175670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56429.id175670.diff
View Options
diff --git a/stand/libofw/openfirm.h b/stand/libofw/openfirm.h
--- a/stand/libofw/openfirm.h
+++ b/stand/libofw/openfirm.h
@@ -89,6 +89,7 @@
int OF_getproplen(phandle_t, const char *);
int OF_getprop(phandle_t, const char *, void *, int);
int OF_getencprop(phandle_t, const char *, cell_t *, int);
+bool OF_hasprop(phandle_t, const char *);
int OF_nextprop(phandle_t, const char *, char *);
int OF_setprop(phandle_t, const char *, void *, int);
int OF_canon(const char *, char *, int);
diff --git a/stand/libofw/openfirm.c b/stand/libofw/openfirm.c
--- a/stand/libofw/openfirm.c
+++ b/stand/libofw/openfirm.c
@@ -288,6 +288,13 @@
return (retval);
}
+/* Check existence of a property of a package. */
+bool
+OF_hasprop(phandle_t node, const char *prop)
+{
+ return (OF_getproplen(node, prop) >= 0);
+}
+
/* Get the next property of a package. */
int
OF_nextprop(phandle_t package, const char *previous, char *buf)
diff --git a/stand/powerpc/ofw/ofwfdt.c b/stand/powerpc/ofw/ofwfdt.c
--- a/stand/powerpc/ofw/ofwfdt.c
+++ b/stand/powerpc/ofw/ofwfdt.c
@@ -32,12 +32,6 @@
extern int command_fdt_internal(int argc, char *argv[]);
-static int
-OF_hasprop(phandle_t node, const char *prop)
-{
- return (OF_getproplen(node, (char *)prop) > 0);
-}
-
static void
add_node_to_fdt(void *buffer, phandle_t node, int fdt_offset)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 4:44 AM (16 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32109659
Default Alt Text
D56429.id175670.diff (1 KB)
Attached To
Mode
D56429: stand/libofw: make OF_hasprop() part of the library
Attached
Detach File
Event Timeline
Log In to Comment