diff options
author | 2013-04-02 05:22:04 +0000 | |
---|---|---|
committer | 2013-04-02 05:22:04 +0000 | |
commit | 84ed2f50fa17e72f12c8c5cf8134a3bdfedaddf7 (patch) | |
tree | 0e3c52e28bbb01ce94f9aa238e227c491c624f80 | |
parent | Pull in <sys/_types.h> instead of <machine/_types.h> in prep for the future (diff) | |
download | wireguard-openbsd-84ed2f50fa17e72f12c8c5cf8134a3bdfedaddf7.tar.xz wireguard-openbsd-84ed2f50fa17e72f12c8c5cf8134a3bdfedaddf7.zip |
handle large time_t
-rw-r--r-- | sbin/scan_ffs/scan_ffs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/scan_ffs/scan_ffs.c b/sbin/scan_ffs/scan_ffs.c index fa96acfe3e9..11f9a7505af 100644 --- a/sbin/scan_ffs/scan_ffs.c +++ b/sbin/scan_ffs/scan_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scan_ffs.c,v 1.14 2007/06/22 19:04:13 otto Exp $ */ +/* $OpenBSD: scan_ffs.c,v 1.15 2013/04/02 05:22:04 deraadt Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist, Tobias Weingartner @@ -82,12 +82,15 @@ ufsscan(int fd, daddr64_t beg, daddr64_t end, int flags) sb->fs_fsize, sb->fs_bsize, sb->fs_cpg, lastmount); } else { + /* XXX 2038 */ + time_t t = sb->fs_ffs1_time; + printf("ffs at %lld size %lld " "mount %s time %s", blk+(n/512)-(2*SBSIZE/512), (long long)(off_t)sb->fs_ffs1_size * sb->fs_fsize, - lastmount, ctime(&sb->fs_ffs1_time)); + lastmount, ctime(&t)); } if (flags & FLAG_SMART) { |