Basic Eraser support.
[pintos-anon] / src / misc / bochs-2.1.1-tty-stdout.patch
diff --git a/src/misc/bochs-2.1.1-tty-stdout.patch b/src/misc/bochs-2.1.1-tty-stdout.patch
new file mode 100644 (file)
index 0000000..8b83ecf
--- /dev/null
@@ -0,0 +1,39 @@
+The fourth patch enables the serial device under Solaris and disables
+tty setup at the same time.  Tty setup is a pain when you want to
+connect a serial port to stdout and it doesn't work under Solaris
+anyway.  This patch is useful everywhere with `pintos', but may not be
+wanted elsewhere.
+
+diff -urp bochs-2.1.1-upstream/iodev/serial.cc bochs-2.1.1/iodev/serial.cc
+--- tmp/bochs-2.1.1/iodev/serial.cc    2004-02-11 14:28:54.000000000 -0800
++++ bochs-2.1.1/iodev/serial.cc        2005-06-01 20:26:01.000000000 -0700
+@@ -118,10 +118,11 @@ bx_serial_c::init(void)
+ #ifdef SERIAL_ENABLE
+   if (strlen(bx_options.com[0].Odev->getptr ()) > 0) {
+-    tty_id = open(bx_options.com[0].Odev->getptr (), O_RDWR|O_NONBLOCK,600);
++    tty_id = open(bx_options.com[0].Odev->getptr (), O_RDWR,600);
+     if (tty_id < 0)
+       BX_PANIC(("open of %s (%s) failed\n",
+                 "com1", bx_options.com[0].Odev->getptr ()));
++#if 0
+     BX_DEBUG(("tty_id: %d",tty_id));
+     tcgetattr(tty_id, &term_orig);
+     bcopy((caddr_t) &term_orig, (caddr_t) &term_new, sizeof(struct termios));
+@@ -145,6 +148,7 @@ bx_serial_c::init(void)
+     term_new.c_cc[VTIME] = 0;
+     //term_new.c_iflag |= IXOFF;
+     tcsetattr(tty_id, TCSAFLUSH, &term_new);
++#endif
+   }
+ #endif   /* def SERIAL_ENABLE */
+   // nothing for now
+@@ -955,7 +968,7 @@ bx_serial_c::rx_timer(void)
+     }
+     if (rdy) {
+       chbuf = data;
+-#elif defined(SERIAL_ENABLE)
++#elif 0 && defined(SERIAL_ENABLE)
+     if ((tty_id >= 0) && (select(tty_id + 1, &fds, NULL, NULL, &tval) == 1)) {
+       (void) read(tty_id, &chbuf, 1);
+       BX_DEBUG(("read: '%c'",chbuf));