This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: asm-generic/unistd.h and glibc use of NR_ipc
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Christoph Hellwig <hch at infradead dot org>
- Cc: Chris Metcalf <cmetcalf at tilera dot com>, linasvepstas at gmail dot com, GLIBC Devel <libc-alpha at sourceware dot org>, linux-kernel at vger dot kernel dot org, libc-ports at sourceware dot org
- Date: Wed, 29 Sep 2010 13:55:06 +0200
- Subject: Re: asm-generic/unistd.h and glibc use of NR_ipc
- References: <AANLkTi=33kimswSJ1tYsnG-PVs6Z4dVBtnqq65GN8Vxw@mail.gmail.com> <4CA1E809.5010103@tilera.com> <20100929051631.GA8116@infradead.org>
On Wednesday 29 September 2010, Christoph Hellwig wrote:
> On Tue, Sep 28, 2010 at 09:05:13AM -0400, Chris Metcalf wrote:
> > Another point where I'd appreciate guidance from libc-alpha is the sysctl()
> > and ustat() APIs. The corresponding system calls are missing from
> > <asm-generic/unistd.h>, since they are deprecated and their functionality
> > is better provided by other means (/proc/sys, fstat). So I've simply had
> > them return -1 with errno == ENOSYS. Is there any reason to think they
> > merit more substantial work? One could imagine baking in some horrible
> > mapping of "integer names" into path components for a sysctl()
> > implementation and reading /proc/sys to provide results, or walking all of
> > the mount points looking for a matching device number to pass a name to
> > fstat(), but I'm not sure it's worth the bloat to the library.
>
> fstat does not replace ustat. ustat is a statf-subsystem by dev_t and
> is not replaced by anything. xfsprogs for example uses it to check if
> a given dev_t is currently mounted. Please add it to the generic code.
>
I didn't put it into the generic list because the man page claims
"ustat() is deprecated and has only been provided for compatibility.
All new programs should use statfs(2) instead."
I suppose that means we should change the man page as well, right?
Arnd