qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] create qemu_openpty_raw() helper function an


From: Brad Smith
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
User-agent: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:17.0) Gecko/20130513 Thunderbird/17.0.6 TenFourFox/Debugging

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 <address@hidden>
---
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 via email to

[Prev in Thread] Current Thread [Next in Thread]