[hurd,commited 1/2] hurd: Define and pass UTIME_NOW and UTIME_OMIT to new file_utimens RPC
Ben Hutchings
ben.hutchings@codethink.co.uk
Tue Mar 6 19:56:00 GMT 2018
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.
More information about the Libc-alpha
mailing list