summaryrefslogtreecommitdiff
path: root/sbin/fsck_ext2fs/inode.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-17 03:33:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-17 03:33:14 +0000
commitf5af74c842d0bd1abb9bfbd4d0dfb3adc8e42945 (patch)
treecba5636acdaa127202af938791a7acc5313f1612 /sbin/fsck_ext2fs/inode.c
parent39fdb6d580c789e87c30a268e80913e731d6a8bc (diff)
ext2fs has a 32-bit time fields. store a u_int32_t of the real time_t --
that should tide us over for a long time. ok guenther
Diffstat (limited to 'sbin/fsck_ext2fs/inode.c')
-rw-r--r--sbin/fsck_ext2fs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ext2fs/inode.c b/sbin/fsck_ext2fs/inode.c
index 713f0fd7407..e3235b8dbd1 100644
--- a/sbin/fsck_ext2fs/inode.c
+++ b/sbin/fsck_ext2fs/inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inode.c,v 1.17 2011/03/12 17:50:47 deraadt Exp $ */
+/* $OpenBSD: inode.c,v 1.18 2013/04/17 03:33:06 deraadt Exp $ */
/* $NetBSD: inode.c,v 1.8 2000/01/28 16:01:46 bouyer Exp $ */
/*
@@ -573,7 +573,7 @@ pinode(ino_t ino)
if (preen)
printf("%s: ", cdevname());
printf("SIZE=%llu ", (long long)inosize(dp));
- t = fs2h32(dp->e2di_mtime);
+ t = (time_t)fs2h32(dp->e2di_mtime);
p = ctime(&t);
printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]);
}
@@ -645,7 +645,7 @@ allocino(ino_t request, int type)
}
dp->e2di_mode = h2fs16(type);
(void)time(&t);
- dp->e2di_atime = h2fs32(t);
+ dp->e2di_atime = (u_int32_t)h2fs32(t);
dp->e2di_mtime = dp->e2di_ctime = dp->e2di_atime;
dp->e2di_dtime = 0;
inossize(dp, sblock.e2fs_bsize);