diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-04-10 06:36:58 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-04-10 06:36:58 +0000 |
commit | e29b7097a2901d2d782faabdba92b1f205958f59 (patch) | |
tree | a13ff4bd883a8e37477f9535b4a38b450234a528 | |
parent | 86991989093727b0ea1909e2a78cfe75a7663f8f (diff) | |
download | FreeBSD-src-e29b7097a2901d2d782faabdba92b1f205958f59.zip FreeBSD-src-e29b7097a2901d2d782faabdba92b1f205958f59.tar.gz |
MFCR r297519, r297525 (by pfg@):
Move Linux specific times tests up to guarantee the values are defined.
-rw-r--r-- | sys/compat/linux/linux_misc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index e806d87..6e34436 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -894,13 +894,14 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args) break; } timesp = times; - } - if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT) /* This breaks POSIX, but is what the Linux kernel does * _on purpose_ (documented in the man page for utimensat(2)), * so we must follow that behaviour. */ - return (0); + if (times[0].tv_nsec == UTIME_OMIT && + times[1].tv_nsec == UTIME_OMIT) + return (0); + } if (args->pathname != NULL) LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); |