3 --- python/xen/xend/XendBootloader.py.orig 2008-01-31 11:06:54.000000000 +0100
4 +++ python/xen/xend/XendBootloader.py 2008-03-02 13:37:58.000000000 +0100
6 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
9 -import os, select, errno, stat, signal
10 +import os, select, errno, stat, signal, tty
13 from xen.xend import sxp
14 @@ -43,6 +43,9 @@ def bootloader(blexec, disk, dom, quiet
18 + if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'):
19 + disk = disk.replace("/dev/", "/dev/r")
21 mkdir.parents("/var/run/xend/boot/", stat.S_IRWXU)
24 @@ -63,12 +66,8 @@ def bootloader(blexec, disk, dom, quiet
25 # where we copy characters between the two master fds, as well as
26 # listening on the bootloader's fifo for the results.
28 - # Termios runes for very raw access to the pty master fds.
29 - attr = [ 0, 0, termios.CS8 | termios.CREAD | termios.CLOCAL,
32 (m1, s1) = pty.openpty()
33 - termios.tcsetattr(m1, termios.TCSANOW, attr)
35 fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY);
37 slavename = ptsname.ptsname(m1)
38 @@ -109,7 +108,7 @@ def bootloader(blexec, disk, dom, quiet
39 # record that this domain is bootloading
40 dom.bootloader_pid = child
42 - termios.tcsetattr(m2, termios.TCSANOW, attr)
44 fcntl.fcntl(m2, fcntl.F_SETFL, os.O_NDELAY);