All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Smith <brad@comstyle.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2] create qemu_openpty_raw() helper function and move it to a separate file
Date: Fri, 07 Jun 2013 11:05:29 -0400	[thread overview]
Message-ID: <51B1F6B9.9090604@comstyle.com> (raw)
In-Reply-To: <1370445949-6666-1-git-send-email-mjt@msgid.tls.msk.ru>

On 05/06/13 11:25 AM, Michael Tokarev wrote:
> In two places qemu uses openpty() which is very system-dependent,
> and in both places the pty is switched to raw mode as well.
> Make a wrapper function which does both steps, and move all the
> system-dependent complexity into a separate file, together
> with static/local implementations of openpty() and cfmakeraw()
> from qemu-char.c.
>
> It is in a separate file, not part of oslib-posix.c, because
> openpty() often resides in -lutil which is not linked to
> every program qemu builds.
>
> This change removes #including of <pty.h>, <termios.h>
> and other rather specific system headers out of qemu-common.h,
> which isn't a place for such specific headers really.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> Changes since v1:
>
> - added a forgotten #include <termios.h> for *BSD,
>    which was recently added into qemu-common.h by
>    Brad Smith, and which I intended to use in
>    qemu-openpty.c too, but somehow forgot.
>
> And one extra comment.  I especially took existing
> code and used it almost unmodified, to have one
> code moving change, with all other possible
> improvements/cleanups to follow later.

This builds Ok on OpenBSD.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

  reply	other threads:[~2013-06-07 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 15:25 [Qemu-devel] [PATCH v2] create qemu_openpty_raw() helper function and move it to a separate file Michael Tokarev
2013-06-07 15:05 ` Brad Smith [this message]
2013-06-11 12:57 ` Michael Tokarev
2013-06-12 23:49   ` Brad Smith
2013-06-13  6:57     ` Michael Tokarev
2013-06-13  8:50 ` Andreas Färber

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=51B1F6B9.9090604@comstyle.com \
    --to=brad@comstyle.com \
    --cc=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.