hid: fix incorrect return value for hid
The return value of hid_keyboard_write is used to set the packet's actual_length and pass to xhci directly to allow guest know how many byte actually processed. Therefore, return 1 to indicate a successful transfer or it will be considered as a wrong xfer. Signed-off-by: ShengYi Hung <aokblast@FreeBSD.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
383c722483
commit
1c0f5142d9
1 changed files with 1 additions and 0 deletions
|
|
@ -478,6 +478,7 @@ int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len)
|
||||||
ledstate |= QEMU_CAPS_LOCK_LED;
|
ledstate |= QEMU_CAPS_LOCK_LED;
|
||||||
}
|
}
|
||||||
kbd_put_ledstate(ledstate);
|
kbd_put_ledstate(ledstate);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue