summaryrefslogtreecommitdiff
path: root/sbin/fsirand
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-02 04:16:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-02 04:16:40 +0000
commit8f0c1ed3f11bc83d96bb80b4c6bf9368ccd0f683 (patch)
tree3a43437924e8710c8be8a1d165da56c15483e2b3 /sbin/fsirand
parent480dbba5a3d93ecc597f6ad6dd30740b11471456 (diff)
handle time_t which is not u_int32_t
ok guenther
Diffstat (limited to 'sbin/fsirand')
-rw-r--r--sbin/fsirand/fsirand.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index 0cd7ce1a2de..8ad82a658e4 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsirand.c,v 1.26 2010/05/18 04:41:14 dlg Exp $ */
+/* $OpenBSD: fsirand.c,v 1.27 2013/04/02 04:16:39 deraadt Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -216,9 +216,11 @@ fsirand(char *device)
}
if (printonly && (sblock->fs_id[0] || sblock->fs_id[1])) {
- if (sblock->fs_inodefmt >= FS_44INODEFMT && sblock->fs_id[0])
+ if (sblock->fs_inodefmt >= FS_44INODEFMT && sblock->fs_id[0]) {
+ time_t t = sblock->fs_id[0]; /* XXX 2038 */
(void)printf("%s was randomized on %s", devpath,
- ctime((const time_t *)&(sblock->fs_id[0])));
+ ctime(&t));
+ }
(void)printf("fsid: %x %x\n", sblock->fs_id[0],
sblock->fs_id[1]);
}