[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platf
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Just a couple comments since I reviewed the previous versions...
On 06/10/2015 11:47, Stefan Hajnoczi wrote:
> > #include <unistd.h>
> > -#include <sys/io.h>
> > #include <sys/mman.h>
> > #include <sys/types.h>
> > #include <sys/stat.h>
>
> 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