[OpenBIOS] [commit] r1368 - in trunk/openbios-devel: include/libopenbios libopenbios

repository service svn at openbios.org
Mon Jan 4 13:03:32 CET 2016


Author: mcayland
Date: Mon Jan  4 13:03:32 2016
New Revision: 1368
URL: http://tracker.coreboot.org/trac/openbios/changeset/1368

Log:
libopenbios: introduce new get_path_from_ph() helper function

This helper function returns the full device path for the device with the
given phandle as a string.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
Reviewed-by: Alexander Graf <agraf at suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/include/libopenbios/bindings.h
   trunk/openbios-devel/libopenbios/bindings.c

Modified: trunk/openbios-devel/include/libopenbios/bindings.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/bindings.h	Mon Jan  4 13:03:29 2016	(r1367)
+++ trunk/openbios-devel/include/libopenbios/bindings.h	Mon Jan  4 13:03:32 2016	(r1368)
@@ -56,6 +56,7 @@
 extern ihandle_t	open_dev( const char *spec );
 extern void		close_package( ihandle_t ih );
 extern void		close_dev( ihandle_t ih );
+extern char		*get_path_from_ph( phandle_t ph );
 
 /* property access */
 extern void		set_property( phandle_t ph, const char *name,

Modified: trunk/openbios-devel/libopenbios/bindings.c
==============================================================================
--- trunk/openbios-devel/libopenbios/bindings.c	Mon Jan  4 13:03:29 2016	(r1367)
+++ trunk/openbios-devel/libopenbios/bindings.c	Mon Jan  4 13:03:32 2016	(r1368)
@@ -366,6 +366,14 @@
 	return ret;
 }
 
+char *
+get_path_from_ph( phandle_t ph )
+{
+	PUSH(ph);
+	fword("get-package-path");
+	return pop_fstr_copy();
+}
+
 phandle_t
 dt_iter_begin( void )
 {



More information about the OpenBIOS mailing list