This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [hurd,commited 1/2] hurd: Define and pass UTIME_NOW and UTIME_OMIT to new file_utimens RPC


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]