This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] __fxstat: replace if() with #if when checking version
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 6 Sep 2016 19:06:06 +0300
- Subject: Re: [RFC PATCH] __fxstat: replace if() with #if when checking version
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuri dot Norov at caviumnetworks dot com;
- References: <1473166521-24827-1-git-send-email-ynorov@caviumnetworks.com> <mvmmvjlfa51.fsf@hawking.suse.de> <20160906155918.GA24871@yury-N73SV>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Tue, Sep 06, 2016 at 06:59:18PM +0300, Yury Norov wrote:
> On Tue, Sep 06, 2016 at 03:08:58PM +0200, Andreas Schwab wrote:
> > On Sep 06 2016, Yury Norov <ynorov@caviumnetworks.com> wrote:
> >
> > > __fxstat() is always passed with _STAT_VER as vers parameter and it's
> > > in internal namespace.
> >
> > It is part of the glibc ABI.
> >
> > > If patch is found reasonable, I can check and fix other platforms and
> > > stat syscalls. Could someone explain me, what for we need 'vers',
> > > if we pass it with the only value everywhere. Maybe it's time to remove it
> > > completely?
> >
> > _STAT_VER has changed over time.
> >
> > Andreas.
>
> OK, now I see. It seems like STAT_IS_KERNEL_STAT hint is used not
> optimal way. In my understanding, it forces user pass vers == _STAT_VER_KERNEL.
> But if so, glibc may avoid generating the text of __xstat_conv(), and
> so no struct kernel_stat is needed. Take a look at the patch below.
> Does it make sense to you?
>
> Yury.
Sorry, I was wrong. Everything is right.