From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjPvH-0003ac-B5 for qemu-devel@nongnu.org; Tue, 06 Oct 2015 06:56:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjPvD-0004T7-Ag for qemu-devel@nongnu.org; Tue, 06 Oct 2015 06:56:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjPvD-0004Sm-5Y for qemu-devel@nongnu.org; Tue, 06 Oct 2015 06:56:39 -0400 References: <1443847454-20406-1-git-send-email-houcheng@gmail.com> <20151006094713.GD19089@stefanha-thinkpad> From: Paolo Bonzini Message-ID: <5613A8DF.3090801@redhat.com> Date: Tue, 6 Oct 2015 12:56:31 +0200 MIME-Version: 1.0 In-Reply-To: <20151006094713.GD19089@stefanha-thinkpad> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Houcheng Lin Cc: peter.maydell@linaro.org, famz@redhat.com, kvm@vger.kernel.org, linhaocheng@itri.org.tw, qemu-devel@nongnu.org, alex.bennee@linaro.org Just a couple comments since I reviewed the previous versions... On 06/10/2015 11:47, Stefan Hajnoczi wrote: > > #include > > -#include > > #include > > #include > > #include > > What is the justification for this? Do you know why io.h was included > before? No reason, the same patch is en route through qemu-trivial. >> >> - >> +#if defined(CONFIG_ANDROID) >> + if (ptsname_r(mfd, slave, PATH_MAX) < 0) >> + goto err; >> +#else >> if ((slave = ptsname(mfd)) == NULL) >> goto err; >> +#endif > > ptsname_r(3) should be used on all Linux hosts because it is reentrant. > This improvement isn't Android-specific, please split it into a separate > patch. Actually everyone except Solaris and Android is already using openpty. This is emulation code for those two OSes. (The gnulib manual mentions that AIX 5.1, HP-UX 11, IRIX 6.5 also don't have openpty, but we don't support those I think). Paolo