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.
Gotcha. I'm also checking for UTIME_NOW and then setting the time_value_t microseconds field to -1 so that old translators use the current time.
Flávio
Samuel