]> granicus.if.org Git - strace/commitdiff
2007-07-23 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 24 Jul 2007 01:58:52 +0000 (01:58 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 24 Jul 2007 01:58:52 +0000 (01:58 +0000)
* time.c (printtv_bitness): SPECIAL only counts when tv_sec == 0.

time.c

diff --git a/time.c b/time.c
index b4c6acf2abbcfecfb033953a3db232ab711dc60b..b6a2fab9f6c69fa4626c4b7be45c6f00d0d85204 100644 (file)
--- a/time.c
+++ b/time.c
@@ -83,9 +83,11 @@ printtv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness, int special)
                        struct timeval32 tv;
 
                        if ((rc = umove(tcp, addr, &tv)) >= 0) {
-                               if (special && tv.tv_usec == UTIME_NOW)
+                               if (special && tv.tv_sec == 0 &&
+                                   tv.tv_usec == UTIME_NOW)
                                        tprintf("UTIME_NOW");
-                               else if (special && tv.tv_usec == UTIME_OMIT)
+                               else if (special && tv.tv_sec == 0 &&
+                                        tv.tv_usec == UTIME_OMIT)
                                        tprintf("UTIME_OMIT");
                                else
                                        tprint_timeval32(tcp, &tv);
@@ -95,9 +97,11 @@ printtv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness, int special)
                        struct timeval tv;
 
                        if ((rc = umove(tcp, addr, &tv)) >= 0) {
-                               if (special && tv.tv_usec == UTIME_NOW)
+                               if (special && tv.tv_sec == 0 &&
+                                   tv.tv_usec == UTIME_NOW)
                                        tprintf("UTIME_NOW");
-                               else if (special && tv.tv_usec == UTIME_OMIT)
+                               else if (special && tv.tv_sec == 0 &&
+                                        tv.tv_usec == UTIME_OMIT)
                                        tprintf("UTIME_OMIT");
                                else
                                        tprint_timeval(tcp, &tv);