$NetBSD: patch-fc,v 1.2 2008/08/15 14:06:54 cegger 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));
 
