bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Change file_utimes RPC to use a struct timespec and update t


From: Samuel Thibault
Subject: Re: [PATCH] Change file_utimes RPC to use a struct timespec and update the servers to use UTIME_NOW and UTIME_OMIT.
Date: Sat, 19 Sep 2015 15:22:49 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Sorry I didn't think about it at first, but inside the fallback on
file_utimes:

Flávio Cruz, le Thu 17 Sep 2015 02:05:33 +0000, a écrit :
> +  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
> +    {
> +      time_value_t atim, mtim;
> +
> +      if (tsp == NULL)
> +        /* Setting the number of microseconds to `-1' tells the
> +           underlying filesystems to use the current time.  */
> +        atim.microseconds = mtim.microseconds = -1;
> +      else
> +        {
> +          TIMESPEC_TO_TIME_VALUE (&atim, &(tsp[0]));
> +          TIMESPEC_TO_TIME_VALUE (&mtim, &(tsp[1]));
> +        }
> +
> +      err = HURD_DPORT_USE (fd, __file_utimes (port, atim, mtim));

We should additionally check for tv_nsec being UTIME_OMIT, and in that
case return EOPNOTSUPP.  Otherwise we'd be telling old translators a
very odd date.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]