commit | 40fd5429bf27e28acd11598f33d2caae5b043731 | [log] [tgz] |
---|---|---|
author | Zev Weiss <zweiss@equinix.com> | Thu Jun 17 05:41:40 2021 +0000 |
committer | Zev Weiss <zweiss@equinix.com> | Thu Jun 17 07:07:19 2021 +0000 |
tree | 68c8750a102d477a060e46bf53d36732c7ac336b | |
parent | 673ac2eb1117a7d692460f808f1d947495d033db [diff] |
Fix error reporting in Input::writeKeyboard() write(2) only sets errno on failure; a successful call leaves it unchanged. We had been being using errno to determine whether or not the write succeeded, but weren't zeroing it before the call and hence could end up spuriously reporting failure from writeKeyboard() even when the write actually succeeded. That false report can in turn cause sendWakeupPacket() to not send the key release after its XK_Shift_L key press, leading to the host thinking the shift key is being held down, which among other minor bits of confusion can cause a boot hang (Ubuntu's GRUB, for example, is patched to interpret a held shift key as a signal from the user to interrupt its default boot sequence and switch to an interactive menu). We now instead just return success immediately after a complete write and false otherwise (if we exhaust our retry attempts or hit a non-EAGAIN failure). Tested: verified with strace that obmc-ikvm sends both the press and the release of the shift key in sendWakeupPacket(); Ubuntu host booted cleanly instead of stopping at the GRUB menu. Signed-off-by: Zev Weiss <zweiss@equinix.com> Change-Id: Ic1229b3979690040879c7e4471ebc987878289e6
The obmc-ikvm application is a VNC server that provides access to the host graphics output. The application interfaces with the video device on the BMC that captures the host graphics, and then serves that video data on the RFB (remote framebuffer, also known as VNC) protocol. The application also interfaces with the BMC USB gadget device to pass HID events from the BMC to the host, allowing the user to interact with the host system.
Once the host is running and an appropriate HID gadget device is instantiated on the BMC, the application can be started with the following command: obmc-ikvm -v <video device path> -i <HID gadget device path>
For example:
obmc-ikvm -v /dev/video0 -i /dev/hidg0