pkgsrc/sysutils/xentools33/patches/patch-fc
bouyer ab784a9525 Fix serial port on pty (serial = 'pty' configuration directive) for
HVM guests. Tested with a NetBSD 4.0.1 i386 boot cd with console on com0.
PKGREVISION++
2009-10-18 21:28:10 +00:00

35 lines
956 B
Text

$NetBSD: patch-fc,v 1.3 2009/10/18 21:28:10 bouyer Exp $
--- ioemu/vl.c.orig 2009-01-05 12:26:59.000000000 +0100
+++ ioemu/vl.c 2009-10-18 23:08:55.000000000 +0200
@@ -108,7 +108,7 @@
#include "exec-all.h"
-#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
+#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/scripts/qemu-ifup"
#ifdef _BSD
#define DEFAULT_BRIDGE "bridge0"
#else
@@ -117,7 +117,7 @@
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
-#define SMBD_COMMAND "/usr/sbin/smbd"
+#define SMBD_COMMAND "@PREFIX@/sbin/smbd"
#endif
//#define DEBUG_UNUSED_IOPORT
@@ -1914,8 +1914,11 @@
}
/* Set raw attributes on the pty. */
+ if (tcgetattr(master_fd, &tty) < 0)
+ perror("tcgetattr");
cfmakeraw(&tty);
- tcsetattr(slave_fd, TCSAFLUSH, &tty);
+ if (tcsetattr(slave_fd, TCSAFLUSH, &tty) < 0)
+ perror("tcsetattr");
fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));