When DEBUG_CIF is defined, a serial message of the form "method(...) = " is emitted by dump_service(). After successful execution the return value and a linebreak are emitted by dump_return(). If however the method fails, nothing is emitted, so that subsequent method calls end up in place of the return value. Observed for getproplen with AIX.
Emit an error indication and a linebreak when DEBUG_CIF is defined.
Signed-off-by: Andreas Färber andreas.faerber@web.de --- libopenbios/client.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libopenbios/client.c b/libopenbios/client.c index 9cea0e7..4c43a99 100644 --- a/libopenbios/client.c +++ b/libopenbios/client.c @@ -306,6 +306,10 @@ of_client_interface( int *params ) if( val == -1 ) printk("Unimplemented service %s ([%ld] -- [%ld])\n", pb->service, pb->nargs, pb->nret ); +#ifdef DEBUG_CIF + else + printk("ERROR!\n"); +#endif return -1; }
Prettify the whitespace placement.
Signed-off-by: Andreas Färber andreas.faerber@web.de --- libopenbios/client.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libopenbios/client.c b/libopenbios/client.c index 4c43a99..16e4323 100644 --- a/libopenbios/client.c +++ b/libopenbios/client.c @@ -220,7 +220,7 @@ static void dump_return(prom_args_t *pb) } else { printk("of_client_interface return:"); for (i = 0; i < pb->nret; i++) { - printk("%lx ", pb->args[pb->nargs + i]); + printk(" %lx", pb->args[pb->nargs + i]); } printk("\n"); }
Andreas Färber wrote:
When DEBUG_CIF is defined, a serial message of the form "method(...) = " is emitted by dump_service(). After successful execution the return value and a linebreak are emitted by dump_return(). If however the method fails, nothing is emitted, so that subsequent method calls end up in place of the return value. Observed for getproplen with AIX.
Emit an error indication and a linebreak when DEBUG_CIF is defined.
These two patches look good to me too - Blue, any objections?
ATB,
Mark.
On Tue, Sep 28, 2010 at 7:32 PM, Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk wrote:
Andreas Färber wrote:
When DEBUG_CIF is defined, a serial message of the form "method(...) = " is emitted by dump_service(). After successful execution the return value and a linebreak are emitted by dump_return(). If however the method fails, nothing is emitted, so that subsequent method calls end up in place of the return value. Observed for getproplen with AIX.
Emit an error indication and a linebreak when DEBUG_CIF is defined.
These two patches look good to me too - Blue, any objections?
They look OK, I just forgot about them.
Andreas Färber wrote:
When DEBUG_CIF is defined, a serial message of the form "method(...) = " is emitted by dump_service(). After successful execution the return value and a linebreak are emitted by dump_return(). If however the method fails, nothing is emitted, so that subsequent method calls end up in place of the return value. Observed for getproplen with AIX.
Emit an error indication and a linebreak when DEBUG_CIF is defined.
Signed-off-by: Andreas Färber andreas.faerber@web.de
Have just applied both patches in this series - thanks a lot!
Mark.