|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] pygrub: make it work
Christoph Egger writes ("[Xen-devel] [PATCH] pygrub: make it work"):
> - tty.setraw(m1);
> - fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY);
> - os.close(s1)
> +
> + # On Solaris, the pty master side will get cranky if we try
> + # to write to it while there is no slave. To work around this,
> + # keep the slave descriptor open until we're done. Set it
> + # to raw terminal parameters, otherwise it will echo back
> + # characters, which will confuse the I/O loop below.
> + # Furthermore, a raw master pty device has no terminal
> + # semantics on Solaris, so don't try to set any attributes
> + # for it.
> + if os.uname()[0] != 'SunOS' and os.uname()[0] != 'NetBSD':
Surely this dependence on uname is wrong. Why would set the termios
flags on the pty master ? They should be set on the slave
unconditionally.
And keeping the slave fd around for a while is harmless too. So I
guess I'm asking why these changes need to be conditional.
> + # filedescriptors:
> + # r - input from the bootloader (bootstring output)
> + # m1 - input/output from/to xenconsole
> + # m2 - input/output from/to pty that controls the bootloader
Can you explain what the purpose of this new code is or relevantly how
it differs from the old (ie, what was wrong with the old code) ?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|