[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH 0/4] mini-os: Enable console to be configured as raw tty using termios
This patch adds minimal TERMIOS support to mini-os consoles, specifically enabling the console to be set into raw mode. In raw mode the mini-os conversion of NL to CRNL is disabled. The main driver for this change is enabling an IOEMU stubdom to transmit data sent by a guest unmodified. Once this change is in mini-os a small additional change is required to QEMU traditional to enable raw mode. In principal TERMIOS support could be extended to include additional TTY settings. console/console.c | 5 +++++ include/console.h | 2 ++ include/posix/termios.h | 1 + lib/sys.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- The patch to QEMU traditional will be submitted separately but is included below for information. diff --git a/qemu-char.c b/qemu-char.c index f62a6af..6495ab8 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1127,12 +1127,19 @@ static CharDriverState *qemu_chr_open_tty(const char *filename) static CharDriverState *qemu_chr_open_pty(void) { CharDriverState *chr; - int fd; + int fd, ret; + struct termios ct; fd = posix_openpt(O_RDWR|O_NOCTTY); if (fd < 0) return NULL; + ret = tcgetattr(fd, &ct); + if (!ret) { + cfmakeraw(&ct); + (void)tcsetattr(fd, TCSANOW, &ct); + } + chr = qemu_chr_open_fd(fd, fd); if (!chr) { close(fd); _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |