aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2012-02-27 10:44:25 +0100
committerThomas Huth <thuth@linux.vnet.ibm.com>2012-02-27 10:44:25 +0100
commitcf13fc9beeb62e4b172905636ff61776c9cae3d8 (patch)
tree13161853a8b18a956255063443f78bf79cd7a2f4
parent33f6dd25bb041beec88a082c6816ad50c20d4508 (diff)
downloadSLOF-cf13fc9beeb62e4b172905636ff61776c9cae3d8.zip
SLOF-cf13fc9beeb62e4b172905636ff61776c9cae3d8.tar.gz
SLOF-cf13fc9beeb62e4b172905636ff61776c9cae3d8.tar.bz2
Added the possibility to debug the "getprop" client interface calls
To analyze the behavior and requirements of boot loaders and OS clients, it's crucial to know which properties they try to read from our device tree. Thus we need the possibility to debug the "getprop" client interface call. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
-rw-r--r--slof/fs/client.fs18
1 files changed, 15 insertions, 3 deletions
diff --git a/slof/fs/client.fs b/slof/fs/client.fs
index 7ffd506..6344085 100644
--- a/slof/fs/client.fs
+++ b/slof/fs/client.fs
@@ -125,9 +125,21 @@ ALSO client-voc DEFINITIONS
;
: getprop ( phandle zstr buf len -- len' )
- >r >r zcount rot get-property
- 0= IF r> swap dup r> min swap >r move r>
- ELSE r> r> 2drop -1 THEN ;
+ >r >r zcount rot ( str-adr str-len phandle R: len buf )
+ debug-client-interface? IF
+ ." ci: getprop " 3dup . ." '" type ." '"
+ THEN
+ get-property
+ debug-client-interface? IF
+ dup IF ." ** not found **" THEN
+ cr
+ THEN
+ 0= IF
+ r> swap dup r> min swap >r move r>
+ ELSE
+ r> r> 2drop -1
+ THEN
+;
: getproplen ( phandle zstr -- len )
zcount rot get-property 0= IF nip ELSE -1 THEN ;