From: "Andreas Färber" <afaerber@suse.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu & openpty
Date: Wed, 05 Jun 2013 13:23:15 +0200 [thread overview]
Message-ID: <51AF1FA3.2010605@suse.de> (raw)
In-Reply-To: <51AF12BF.6080600@msgid.tls.msk.ru>
Am 05.06.2013 12:28, schrieb Michael Tokarev:
> Hello.
>
> One of old issues with compatibility between different
> *Nix systems was the way how pty pairs were allocated.
>
> And qemu have a twist in #includes, depending on which
> platform it is run, and quite some compat cruft in
> qemu-char.c about this issue.
>
> Here it is, from qemu-char.c:
>
> #ifdef __sun__
> /* Once Solaris has openpty(), this is going to be removed. */
> static int openpty(int *amaster, int *aslave, char *name,
> struct termios *termp, struct winsize *winp)
> {...}
>
> static void cfmakeraw (struct termios *termios_p)
> {...}
> #endif
>
> and later on, openpty() is used in the code. Note that
> both functions are marked as static - static to the
> source file, qemu-char.c.
>
> Now, we have ui/gtk.c, which calls openpty() and cfmakeraw()
> too, but this time, there's no compat alternative implementation
> provided.
>
> Does this mean we don't need the old compat implementation
> anymore? Does gtk ui work (or at least builds) on solaris?
I haven't tried yet, but this sounds like something for osdep.c, no need
for a special qemu-openpty.c.
Andreas
>
> If gtk builds fine on solaris, it should be safe to remove
> these static functions from qemu-char.c.
>
> If not, we should obviously re-use these for ui/gtk.c --
> for which I'd create a new file, say, qemu-openpty.c,
> with all the system-dependent stuff inside, and create
> a wrapper function, qemu_openpty(), to do the work,
> and, ofcourse, remove <pty.h> and other fancy stuff
> (like <stropts.h> for solaris) from qemu-common.h (!!!)
> where it finally ended up.
>
> Thanks,
>
> /mjt
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-06-05 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 10:28 [Qemu-devel] qemu & openpty Michael Tokarev
2013-06-05 11:23 ` Andreas Färber [this message]
2013-06-05 14:38 ` Michael Tokarev
2013-06-05 12:39 ` Brad Smith
2013-06-05 12:41 ` Brad Smith
2013-06-05 12:43 ` Brad Smith
2013-06-05 13:03 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AF1FA3.2010605@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.