This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [hurd,commited 1/2] hurd: Define and pass UTIME_NOW and UTIME_OMIT to new file_utimens RPC
- From: Ben Hutchings <ben dot hutchings at codethink dot co dot uk>
- To: Samuel Thibault <samuel dot thibault at ens-lyon dot org>, libc-alpha at sourceware dot org
- Cc: Flávio Cruz <flaviocruz at gmail dot com>
- Date: Tue, 06 Mar 2018 19:56:35 +0000
- Subject: Re: [hurd,commited 1/2] hurd: Define and pass UTIME_NOW and UTIME_OMIT to new file_utimens RPC
- Authentication-results: sourceware.org; auth=none
- References: <20180306074519.6980-1-samuel.thibault@ens-lyon.org> <20180306074519.6980-2-samuel.thibault@ens-lyon.org>
On Tue, 2018-03-06 at 08:45 +0100, Samuel Thibault wrote:
[...]
> --- a/sysdeps/mach/hurd/futimens.c
> +++ b/sysdeps/mach/hurd/futimens.c
> @@ -27,24 +27,53 @@
> int
> __futimens (int fd, const struct timespec tsp[2])
> {
[...]
> + err = HURD_DPORT_USE (fd, __file_utimens (port, atime, mtime));
> +
> + if (err == MIG_BAD_ID || err == EOPNOTSUPP)
> + {
[...]
> int
> __futimes (int fd, const struct timeval tvp[2])
> {
[...]
> + err = HURD_DPORT_USE (fd, __file_utimens (port, atime, mtime));
> +
> + if (err == EMIG_BAD_ID || err == EOPNOTSUPP)
> {
[...]
Shouldn't this error be cached, to avoid making twice as many calls on
older Hurd versions? That seems to be the usual practice for Linux
glibc code that has fallbacks for missing system calls.
Ben.
--
Ben Hutchings
Software Developer, Codethink Ltd.