summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-04-02 04:16:39 +0000
committerderaadt <deraadt@openbsd.org>2013-04-02 04:16:39 +0000
commitf6bd394bda8813a044fc25e9dae7b5f011f0ca23 (patch)
tree0f5ddbecee51b50245de0dcb43742b6210da2b0c
parentUse internal types instead of the old BSD u_int#_t types in the (diff)
downloadwireguard-openbsd-f6bd394bda8813a044fc25e9dae7b5f011f0ca23.tar.xz
wireguard-openbsd-f6bd394bda8813a044fc25e9dae7b5f011f0ca23.zip
handle time_t which is not u_int32_t
ok guenther
-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]);
}