From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkyFy-0008I2-ER for qemu-devel@nongnu.org; Fri, 07 Jun 2013 11:07:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkyFx-0001kJ-0m for qemu-devel@nongnu.org; Fri, 07 Jun 2013 11:07:10 -0400 Received: from speedy.comstyle.com ([2001:470:1d:8c::2]:22356 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkyFw-0001ei-SQ for qemu-devel@nongnu.org; Fri, 07 Jun 2013 11:07:08 -0400 Message-ID: <51B1F6B9.9090604@comstyle.com> Date: Fri, 07 Jun 2013 11:05:29 -0400 From: Brad Smith MIME-Version: 1.0 References: <1370445949-6666-1-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1370445949-6666-1-git-send-email-mjt@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] create qemu_openpty_raw() helper function and move it to a separate file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, =?ISO-8859-1?Q?Andreas_F=E4rber?= 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 , > 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 > --- > Changes since v1: > > - added a forgotten #include 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.