patch-1.3.71 linux/arch/sparc/prom/tree.c
Next file: linux/drivers/block/floppy.c
Previous file: linux/arch/sparc/prom/misc.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Mon Mar 4 08:49:59 1996
- Orig file:
v1.3.70/linux/arch/sparc/prom/tree.c
- Orig date:
Sat Nov 25 19:04:38 1995
diff -u --recursive --new-file v1.3.70/linux/arch/sparc/prom/tree.c linux/arch/sparc/prom/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.6 1995/11/25 01:00:16 davem Exp $
+/* $Id: tree.c,v 1.7 1996/01/01 02:46:24 davem Exp $
* tree.c: Basic device tree traversal/scanning for the Linux
* prom library.
*
@@ -172,6 +172,19 @@
{
if(node == -1) return "";
return prom_nodeops->no_nextprop(node, oprop);
+}
+
+int
+prom_node_has_property(int node, char *prop)
+{
+ char *current_property = "";
+
+ do {
+ current_property = prom_nextprop(node, current_property);
+ if(!strcmp(current_property, prop))
+ return 1;
+ } while (*current_property);
+ return 0;
}
/* Set property 'pname' at node 'node' to value 'value' which has a length
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this