mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-27 06:55:23 +00:00
a8f063db7c
Refactor the serial buffer handling in order to write the serial buffer's output to a PTY connected after the serial device stops being written to by the guest. This change moves the serial buffer initialization inside the serial manager. That is done to allow the serial buffer to be made aware of the PTY and epoll fds needed in order to modify the EpollDispatch::File trigger. These are then used by the serial buffer to trigger an epoll event when the PTY fd is writable and the buffer has content in it. They are also used to remove the trigger when the buffer is emptied in order to avoid unnecessary wake-ups. Signed-off-by: William Douglas <william.douglas@intel.com>