* [PATCH] [UPDATE] qemu: implement qemu_chr_open_pty for stubdoms
@ 2009-06-17 12:45 Stefano Stabellini
2009-06-18 14:22 ` Ian Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2009-06-17 12:45 UTC (permalink / raw)
To: xen-devel
Hi all,
this is an updated version of the patch "implement qemu_chr_open_pty for
stubdoms": qemu_chr_open_pty is now based on posix_openpt instead of
openpty(void).
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
diff --git a/qemu-char.c b/qemu-char.c
index 819b881..7a6a33d 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1120,6 +1120,26 @@ static CharDriverState *qemu_chr_open_tty(const char *filename)
qemu_chr_reset(chr);
return chr;
}
+#elif CONFIG_STUBDOM
+#include <fcntl.h>
+static CharDriverState *qemu_chr_open_pty(void)
+{
+ CharDriverState *chr;
+ int fd;
+
+ fd = posix_openpt(O_RDWR|O_NOCTTY);
+ if (fd < 0)
+ return NULL;
+
+ chr = qemu_chr_open_fd(fd, fd);
+ if (!chr) {
+ close(fd);
+ return NULL;
+ }
+
+ qemu_chr_reset(chr);
+ return chr;
+}
#else /* ! __linux__ && ! __sun__ */
static CharDriverState *qemu_chr_open_pty(void)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [UPDATE] qemu: implement qemu_chr_open_pty for stubdoms
2009-06-17 12:45 [PATCH] [UPDATE] qemu: implement qemu_chr_open_pty for stubdoms Stefano Stabellini
@ 2009-06-18 14:22 ` Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2009-06-18 14:22 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel
Stefano Stabellini writes ("[Xen-devel] [PATCH] [UPDATE] qemu: implement qemu_chr_open_pty for stubdoms"):
> this is an updated version of the patch "implement qemu_chr_open_pty for
> stubdoms": qemu_chr_open_pty is now based on posix_openpt instead of
> openpty(void).
Applied, thanks. (This will appear in qemu-xen-unstable staging very
shortly; it will appear in qemu-xen-unstable proper when the tests
pass or if we push manually.)
Keir has already applied the patch to xen-unstable.
Ian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-18 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 12:45 [PATCH] [UPDATE] qemu: implement qemu_chr_open_pty for stubdoms Stefano Stabellini
2009-06-18 14:22 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.