From 6d5abd33ed706e097c5fa94f8822130d02dba279 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 23 Dec 2014 10:42:40 -0800 Subject: [PATCH] Fix UTIME_NOW/UTIME_OMIT decoding The kernel doesn't actually care what tv_sec is set to --- it only checks tv_nsec when looking for the special values. --- time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/time.c b/time.c index 58d46280..68efc803 100644 --- a/time.c +++ b/time.c @@ -87,7 +87,7 @@ sprinttv(char *buf, struct tcb *tcp, long addr, enum bitness_t bitness, int spec rc = umove(tcp, addr, &tv); if (rc >= 0) { - if (special && tv.tv_sec == 0) { + if (special) { if (tv.tv_usec == UTIME_NOW) return stpcpy(buf, "UTIME_NOW"); if (tv.tv_usec == UTIME_OMIT) @@ -101,7 +101,7 @@ sprinttv(char *buf, struct tcb *tcp, long addr, enum bitness_t bitness, int spec rc = umove(tcp, addr, &tv); if (rc >= 0) { - if (special && tv.tv_sec == 0) { + if (special) { if (tv.tv_usec == UTIME_NOW) return stpcpy(buf, "UTIME_NOW"); if (tv.tv_usec == UTIME_OMIT) -- 2.34.1