[OpenBIOS] [PATCH] CIF: Fix trace output for claim and release

Andreas Färber andreas.faerber at web.de
Wed Oct 13 23:22:48 CEST 2010


A misplaced digit 8 made it look as if some signedness issue was present
somewhere between libopenbios/client.c:of_client_interface() and
arch/ppc/qemu/methods.c:ciface_claim(). This is not the case;
despite unsigned long -> ucell -> cell -> ucell conversions,
PUSH'ing 0x81234567 and POP'ing works as expected.

Fix the format string to avoid such confusion.
Add zero-padding while at it.

Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 libopenbios/client.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libopenbios/client.c b/libopenbios/client.c
index a93d8a3..d8a9fdf 100644
--- a/libopenbios/client.c
+++ b/libopenbios/client.c
@@ -132,10 +132,10 @@ static void dump_service(prom_args_t *pb)
 			pb->args[0], pb->args[1], pb->args[2]);
 #endif
 	} else if (strcmp(pb->service, "claim") == 0) {
-		printk("claim(0x8%lx, %ld, %ld) = ",
+		printk("claim(0x%08lx, %ld, %ld) = ",
 			pb->args[0], pb->args[1], pb->args[2]);
 	} else if (strcmp(pb->service, "release") == 0) {
-		printk("release(0x8%lx, %ld)\n",
+		printk("release(0x%08lx, %ld)\n",
 			pb->args[0], pb->args[1]);
 	} else if (strcmp(pb->service, "boot") == 0) {
 		printk("boot \"%s\"\n", (char*)pb->args[0]);
-- 
1.7.3




More information about the OpenBIOS mailing list