head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.26 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.24 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.22 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.20 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.18 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.16 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.14 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.12 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.10 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.8 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.6 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.4 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.2 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.1.1.1.0.4 pkgsrc-2007Q1-base:1.1.1.1 pkgsrc-2006Q4:1.1.1.1.0.2 pkgsrc-2006Q4-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 2007.06.14.19.45.03; author bouyer; state dead; branches; next 1.1; 1.1 date 2006.10.19.22.58.21; author bouyer; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2006.10.19.22.58.21; author bouyer; state Exp; branches; next ; desc @@ 1.2 log @Renamed xen*30 to xen*3 @ text @$NetBSD: patch-ar,v 1.1 2006/10/19 22:58:21 bouyer Exp $ --- ioemu/vl.c.orig 2006-10-15 14:22:03.000000000 +0200 +++ ioemu/vl.c 2006-10-20 00:33:18.000000000 +0200 @@@@ -37,14 +37,17 @@@@ #include #include #include +#include #include #include +#include +#include #include #include #include #ifdef _BSD #include -#ifndef __APPLE__ +#ifndef _BSD #include #endif #else @@@@ -88,8 +91,8 @@@@ #include "exec-all.h" -#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup" -#define DEFAULT_BRIDGE "xenbr0" +#define DEFAULT_NETWORK_SCRIPT "@@XENDCONFDIR@@/scripts/qemu-ifup" +#define DEFAULT_BRIDGE "bridge0" //#define DEBUG_UNUSED_IOPORT //#define DEBUG_IOPORT @@@@ -1603,7 +1606,7 @@@@ return 0; } -#if defined(__linux__) +#if defined(__linux__) || defined(__NetBSD__) CharDriverState *qemu_chr_open_pty(void) { struct termios tty; @@@@ -1755,7 +1758,7 @@@@ chr->chr_ioctl = tty_serial_ioctl; return chr; } - +#if defined(__linux__) static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) { int fd = (int)chr->opaque; @@@@ -1818,13 +1821,14 @@@@ chr->chr_ioctl = pp_ioctl; return chr; } +#endif /* __linux__ */ #else CharDriverState *qemu_chr_open_pty(void) { return NULL; } -#endif +#endif /* __linux__ || __NetBSD__ */ #endif /* !defined(_WIN32) */ @@@@ -3064,7 +3068,7 @@@@ fclose(f); atexit(smb_exit); - snprintf(smb_cmdline, sizeof(smb_cmdline), "/usr/sbin/smbd -s %s", + snprintf(smb_cmdline, sizeof(smb_cmdline), "@@PREFIX@@/sbin/smbd -s %s", smb_conf); slirp_add_exec(0, smb_cmdline, 4, 139); @@@@ -3128,16 +3132,26 @@@@ int fd; char *dev; struct stat s; + struct ifreq ifr; fd = open("/dev/tap", O_RDWR); if (fd < 0) { - fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n"); + fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno)); return -1; } +#ifdef TAPGIFNAME + if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) { + fprintf(stderr, "warning: could not open get tap name: %s\n", + strerror(errno)); + return -1; + } + pstrcpy(ifname, ifname_size, ifr.ifr_name); +#else fstat(fd, &s); dev = devname(s.st_rdev, S_IFCHR); pstrcpy(ifname, ifname_size, dev); +#endif fcntl(fd, F_SETFL, O_NONBLOCK); return fd; @@@@ -5855,9 +5869,36 @@@@ xen_pfn_t *page_array; extern void *shared_page; extern void *buffered_io_page; + struct rlimit rl; char qemu_dm_logfilename[64]; + /* XXX required for now */ + if (setenv("PTHREAD_DIAGASSERT", "A", 1) != 0) + perror("setenv"); + if (getrlimit(RLIMIT_STACK, &rl) != 0) { + perror("getrlimit(RLIMIT_STACK)"); + exit(1); + } + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_STACK, &rl) != 0) + perror("setrlimit(RLIMIT_STACK)"); + if (getrlimit(RLIMIT_DATA, &rl) != 0) { + perror("getrlimit(RLIMIT_DATA)"); + exit(1); + } + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_DATA, &rl) != 0) + perror("setrlimit(RLIMIT_DATA)"); + rl.rlim_cur = RLIM_INFINITY; + rl.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_RSS, &rl) != 0) + perror("setrlimit(RLIMIT_RSS)"); + rl.rlim_cur = RLIM_INFINITY; + rl.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0) + perror("setrlimit(RLIMIT_MEMLOCK)"); + LIST_INIT (&vm_change_state_head); #ifndef _WIN32 { @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: $ @ 1.1.1.1 log @Import a xentools30-hvm package, version 3.0.3 The Xen virtual machine monitor allows running several virtual machines on a single physical machine. The xentools30-vmx package contains additionnal tools to xentools30 to run unmodified guests using the Intel VT or AMD VMX extentions. @ text @@