On Fri, Mar 22, 2019 at 10:10:43AM -0600, Todd C. Miller wrote: > On Fri, 22 Mar 2019 11:04:05 -0500, Scott Cheloha wrote: > > > I always forget about the special value shortcut for utimes(2) et al. > > > > This is equivalent/simpler/more portable. > > That looks good but I wonder why we are not preserving the nanosecond > mtime by using st_mtim?
I assumed subseconds were not handled/preserved by the protocol, but I might be wrong. Possibly relevant, from (our) rsync(5): > Update exchange > When the client or server is in sender mode, it begins by conditionally > sending the exclusion list. At this time, this is always empty. > > 1. if --delete and the client, exclusion list zero (integer) > > It then sends the File list. Prior to being sent, the file list should > be lexicographically sorted. > > 1. status byte (integer) > 2. inherited filename length (optional, byte) > 3. filename length (integer or byte) > 4. file (byte array) > 5. file length (long) > 6. file modification time (optional, time_t, integer) > 7. file mode (optional, mode_t, integer) > 8. if -o, the user id (integer) > 9. if -g, the group id (integer) > 10. if a special file and -D, the device "rdev" type (integer) > 11. if a symbolic link and -l, the link target's length (integer) > 12. if a symbolic link and -l, the link target (byte array) ... it says the modification time is a time_t. Which means we only have seconds, not subseconds. But don't quote me on that, I'm just guessing. -Scott
