From: Houcheng Lin <houcheng@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Fam Zheng" <famz@redhat.com>,
kvm@vger.kernel.org, linhaocheng@itri.org.tw,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [RFC PATCH v3] os-android: Add support to android platform
Date: Sat, 3 Oct 2015 12:11:19 +0800 [thread overview]
Message-ID: <CAL8JtxDfCSF4XBFK1+-vSRe-CdjH_g0ZVn2vZeTbHJi47t2YOQ@mail.gmail.com> (raw)
In-Reply-To: <56092736.5050908@redhat.com>
2015-09-28 19:40 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>
>
> On 24/09/2015 15:21, Houcheng Lin wrote:
>> +if [ "$android" = "yes" ] ; then
>> + LIBS="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc $LIBS"
>> + libs_qga="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc"
>> +fi
>
> This change should not be necessary.
>
>> +#define getdtablesize qemu_getdtablesize
>
> Please instead replace all occurrences of getdtablesize with
> qemu_getdtablesize.
>
>>
>> +#ifdef CONFIG_ANDROID
>> +#include "sysemu/os-android.h"
>> +#endif
>> +
>
> Please replace this with
>
> #include <libgen.h>
>
> #ifndef IOV_MAX
> #define IOV_MAX 1024
> #endif
>
> and get rid of os-android.h.
>
>>
>> +#if defined(CONFIG_ANDROID)
>> + char pty_buf[PATH_MAX];
>> + #define ptsname(fd) pty_buf
>> +#endif
>> const char *slave;
>> int mfd = -1, sfd = -1;
>>
>> @@ -67,17 +72,21 @@ static int openpty(int *amaster, int *aslave, char *name,
>>
>> if (grantpt(mfd) == -1 || unlockpt(mfd) == -1)
>> goto err;
>> -
>> +#if defined(CONFIG_ANDROID)
>> + if (ptsname_r(mfd, pty_buf, PATH_MAX) < 0)
>> + goto err;
>> +#endif
>> if ((slave = ptsname(mfd)) == NULL)
>> goto err;
>>
>
>
> Better:
>
> #if defined(CONFIG_ANDROID)
> char slave[PATH_MAX];
> #else
> const char *slave;
> #endif
>
> ...
>
> #if defined(CONFIG_ANDROID)
> if (ptsname_r(mfd, slave, PATH_MAX) < 0)
> goto err;
> #else
> if ((slave = ptsname(mfd)) == NULL)
> goto err;
> #endif
Hi Paolo,
Okay and I will send the patch with these modifications soon. Thanks!
--
Best regards,
Houcheng Lin
prev parent reply other threads:[~2015-10-03 4:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 13:21 [Qemu-devel] [RFC PATCH v3] os-android: Add support to android platform Houcheng Lin
2015-09-28 11:40 ` Paolo Bonzini
2015-10-03 4:11 ` Houcheng Lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL8JtxDfCSF4XBFK1+-vSRe-CdjH_g0ZVn2vZeTbHJi47t2YOQ@mail.gmail.com \
--to=houcheng@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=famz@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linhaocheng@itri.org.tw \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).