"Yu, Ping Y" <ping.y.yu@xxxxxxxxx> wrote on 12/01/2005 03:01:30 AM:
> Thanks Daniel. :-)
> The protection mechanism is a little weak. Here is my patch.
>
> diff -r 28ce48573771 tools/ioemu/vl.c
> --- a/tools/ioemu/vl.c Wed Nov 30 19:55:08 2005
> +++ b/tools/ioemu/vl.c Thu Dec 1 17:00:21 2005
> @@ -1218,17 +1218,22 @@
> CharDriverState *qemu_chr_open_pty(void)
> {
> int master_fd, slave_fd;
> + char *slave_name;
> struct termios term;
>
> if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0)
> return NULL;
>
> - /* Set raw attributes on the pty. */
> - cfmakeraw(&term);
> - tcsetattr(slave_fd, TCSAFLUSH, &term);
> -
> - fprintf(stderr, "char device redirected to %s\n",
ptsname(slave_fd));
> - store_console_dev(domid, ptsname(slave_fd));
> + slave_name = ptsname(master_fd);
> + if (slave_name) {
> + fprintf(stderr, "char device redirected to %s\n", slave_name);
> + store_console_dev(domid, slave_name);
> + /* Set raw attributes on the pty. */
> + cfmakeraw(&term);
> + tcsetattr(slave_fd, TCSAFLUSH, &term);
> + } else {
> + fprintf(logfile, "failed to redirect char device to pty");
> + }
>
> return qemu_chr_open_fd(master_fd, master_fd);
> }
Thanks! The patch gets my VMX domain to start booting. Now I have to
figure out why it is running so s-----l-----o-----w-----l-----y.
Steve D.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|