mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix two errors related to argument passing in the client interface:
i) client-call-iface did not set a return value of 0 on success; hence the top stack argument was dropped as part of the status check causing an off-by-one error. ii) instead of setting pb->nret to be the number of arguments returned, the (random) value being passed in was being used to control the number of arguments being returned. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@732 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
db3348538a
commit
3111a2293b
@@ -302,11 +302,11 @@ of_client_interface( int *params )
|
||||
return -1;
|
||||
}
|
||||
|
||||
for( i=0; i<pb->nret && dstackcnt > dstacksave ; i++ )
|
||||
pb->args[pb->nargs + i] = POP();
|
||||
for( pb->nret=0; dstackcnt > dstacksave ; pb->nret++ )
|
||||
pb->args[pb->nargs + pb->nret] = POP();
|
||||
|
||||
#ifdef DEBUG_CIF
|
||||
if( i != pb->nret || dstackcnt != dstacksave ) {
|
||||
if( dstackcnt != dstacksave ) {
|
||||
printk("service %s: argument count error (%d %d)\n",
|
||||
pb->service, i, dstackcnt - dstacksave );
|
||||
dstackcnt = dstacksave;
|
||||
|
||||
Reference in New Issue
Block a user