summaryrefslogtreecommitdiff
blob: 9d1ee76ee9cbe60a644d6638fb406b71a8fbae0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
http://bugs.gentoo.org/204457

------- Comment  #5 From SpanKY  2008-01-06 18:08:07 0000  [reply] -------

i dont have any way of actually run time testing this, but the fix is probably:
-        tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
-        tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
-        tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
+        tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime.tv_sec));
+        tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime.tv_sec));
+        tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec));

sprinttime() takes a time_t which represents the time (in seconds).  the time
members of the solstatbuf are the time (in seconds) as well as nanosecond
granularity.  since sprinttime() doesnt include nanosecond granularity, we dont
care about that part of the time.

someone needs to find a sparc system running with the personality required and
exercise this difference

--- strace-4.5.16/file.c
+++ strace-4.5.16/file.c
@@ -766,9 +766,9 @@
 		break;
 	}
 	if (!abbrev(tcp)) {
-		tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
-		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
-		tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
+		tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime.tv_sec));
+		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime.tv_sec));
+		tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec));
 	}
 	else
 		tprintf("...}");