From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform Date: Tue, 6 Oct 2015 12:56:31 +0200 Message-ID: <5613A8DF.3090801@redhat.com> References: <1443847454-20406-1-git-send-email-houcheng@gmail.com> <20151006094713.GD19089@stefanha-thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, famz@redhat.com, alex.bennee@linaro.org, linhaocheng@itri.org.tw, peter.maydell@linaro.org, kvm@vger.kernel.org To: Stefan Hajnoczi , Houcheng Lin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43431 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751785AbbJFK4i (ORCPT ); Tue, 6 Oct 2015 06:56:38 -0400 In-Reply-To: <20151006094713.GD19089@stefanha-thinkpad> Sender: kvm-owner@vger.kernel.org List-ID: 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