linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [libgpiod][PATCH 2/3] tools-common: fix build for Android
Date: Tue, 18 Aug 2020 18:04:06 +0200	[thread overview]
Message-ID: <20200818160406.GA500735@p1g2> (raw)
In-Reply-To: <CAMRc=Md81RAdG9Ekh5u+=VtS6uNxP3NCOi_e+DwzXYLbGO+8=w@mail.gmail.com>

Hi,

On Mon, Aug 17, 2020 at 03:04:57PM +0200, Bartosz Golaszewski wrote:
> On Mon, Aug 17, 2020 at 10:23 AM Gary Bisson
> <gary.bisson@boundarydevices.com> wrote:
> >
> > Hi,
> >
> > Sorry for the delay.
> >
> > On Mon, Aug 10, 2020 at 09:15:18PM +0200, Bartosz Golaszewski wrote:
> > > On Mon, Jun 8, 2020 at 11:07 AM Gary Bisson
> > > <gary.bisson@boundarydevices.com> wrote:
> > > >
> > > > program_invocation_name doesn't exist in Android, getprogname() should
> > > > be used instead.
> > > >
> > > > Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> > > > ---
> > > > Hi,
> > > >
> > > > I couldn't an equivalent to program_invocation_short_name, so the
> > > > program is now using program_invocation_name all the time, hope it's ok.
> > > >
> > > > Regards,
> > > > Gary
> > > > ---
> > > >  tools/tools-common.c | 10 +++++++---
> > > >  1 file changed, 7 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/tools/tools-common.c b/tools/tools-common.c
> > > > index 12bde20..1d7fc2c 100644
> > > > --- a/tools/tools-common.c
> > > > +++ b/tools/tools-common.c
> > > > @@ -21,7 +21,11 @@
> > > >
> > > >  const char *get_progname(void)
> > > >  {
> > > > +#if defined __ANDROID__
> > >
> > > I'd prefer to keep libgpiod Android-agnostic. Does prctl() exist in
> > > Android? It too can be used for that.
> >
> > Yes I understand. prctl() can be used in Android so it would definitely
> > be a better option.
> >
> > Regards,
> > Gary
> 
> The name returned by prctl(PR_GET_NAME, ...) is equivalent to
> program_invocation_short_name. That would mean ditching the full
> executable path everywhere in messages. Alternatively we can just set
> the full program name at the start of every tool. I'm fine with the
> latter too as long as we don't stick these __ANDROID__ ifdefs in the
> tree.

Ok, I'll test this and send a v2. Might not be before next week though.

Regards,
Gary

  reply	other threads:[~2020-08-18 16:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  9:06 [libgpiod][PATCH 0/3] Add Android build support Gary Bisson
2020-06-08  9:06 ` [libgpiod][PATCH 1/3] core: add missing header inclusion Gary Bisson
2020-06-08  9:06 ` [libgpiod][PATCH 2/3] tools-common: fix build for Android Gary Bisson
2020-08-10 19:15   ` Bartosz Golaszewski
2020-08-17  8:23     ` Gary Bisson
2020-08-17 13:04       ` Bartosz Golaszewski
2020-08-18 16:04         ` Gary Bisson [this message]
2020-06-08  9:06 ` [libgpiod][PATCH 3/3] Android.bp: initial addition Gary Bisson
2020-08-10 19:51   ` Bartosz Golaszewski
2020-08-17  8:38     ` Gary Bisson
2020-08-17 16:24       ` Bartosz Golaszewski
2020-08-18 16:01         ` Bartosz Golaszewski
2020-08-18 16:05           ` Gary Bisson

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=20200818160406.GA500735@p1g2 \
    --to=gary.bisson@boundarydevices.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-gpio@vger.kernel.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).