Currently the whole buffer supplied by the client is traced. AIX uses buffer sizes such as 64, 256, 1024 on properties that might not exist or contain 1 or 8 bytes.
Limit the output to the amount of data actually written into the buffer.
Signed-off-by: Andreas Färber andreas.faerber@web.de --- libopenbios/client.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libopenbios/client.c b/libopenbios/client.c index 2b78dcc..a93d8a3 100644 --- a/libopenbios/client.c +++ b/libopenbios/client.c @@ -171,7 +171,8 @@ static void dump_return(prom_args_t *pb) printk("0x%08lx\n", pb->args[pb->nargs]); } else if (strcmp(pb->service, "getprop") == 0) { printk("%ld\n", pb->args[pb->nargs]); - memdump((char*)pb->args[2], pb->args[3]); + if ((long)pb->args[pb->nargs] != -1) + memdump((char*)pb->args[2], MIN(pb->args[3], pb->args[pb->nargs])); } else if (strcmp(pb->service, "nextprop") == 0) { printk("%ld\n", pb->args[pb->nargs]); memdump((char*)pb->args[2], pb->args[pb->nargs]);