summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pelikan <pelikan@cvs.openbsd.org>2014-07-13 13:37:23 +0000
committerMartin Pelikan <pelikan@cvs.openbsd.org>2014-07-13 13:37:23 +0000
commitd2c259fda14c4e6d4966463c62828c39ddd07785 (patch)
tree1236cdb257e7c50ff64c882e23d13b67fa443b5e
parentfc08a83358c78094f736f5bd28d9cbce62c20a02 (diff)
new superblock header needs fixes for BE architectures
-rw-r--r--sbin/newfs_ext2fs/ext2fs_bswap.c4
-rw-r--r--sbin/newfs_ext2fs/mke2fs.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sbin/newfs_ext2fs/ext2fs_bswap.c b/sbin/newfs_ext2fs/ext2fs_bswap.c
index 844d8cb1596..4ca700a6c54 100644
--- a/sbin/newfs_ext2fs/ext2fs_bswap.c
+++ b/sbin/newfs_ext2fs/ext2fs_bswap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_bswap.c,v 1.2 2014/07/11 22:23:20 miod Exp $ */
+/* $OpenBSD: ext2fs_bswap.c,v 1.3 2014/07/13 13:37:22 pelikan Exp $ */
/* $NetBSD: ext2fs_bswap.c,v 1.6 2000/07/24 00:23:10 mycroft Exp $ */
/*
@@ -58,7 +58,7 @@ e2fs_sb_bswap(struct ext2fs *old, struct ext2fs *new)
new->e2fs_ficount = swap32(old->e2fs_ficount);
new->e2fs_first_dblock = swap32(old->e2fs_first_dblock);
new->e2fs_log_bsize = swap32(old->e2fs_log_bsize);
- new->e2fs_fsize = swap32(old->e2fs_fsize);
+ new->e2fs_log_fsize = swap32(old->e2fs_log_fsize);
new->e2fs_bpg = swap32(old->e2fs_bpg);
new->e2fs_fpg = swap32(old->e2fs_fpg);
new->e2fs_ipg = swap32(old->e2fs_ipg);
diff --git a/sbin/newfs_ext2fs/mke2fs.c b/sbin/newfs_ext2fs/mke2fs.c
index a806c9ec98d..d57f1d551e5 100644
--- a/sbin/newfs_ext2fs/mke2fs.c
+++ b/sbin/newfs_ext2fs/mke2fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mke2fs.c,v 1.8 2014/07/11 15:16:22 pelikan Exp $ */
+/* $OpenBSD: mke2fs.c,v 1.9 2014/07/13 13:37:22 pelikan Exp $ */
/* $NetBSD: mke2fs.c,v 1.13 2009/10/19 18:41:08 bouyer Exp $ */
/*-
@@ -238,10 +238,10 @@ mke2fs(const char *fsys, int fi, int fo)
}
sblock.e2fs.e2fs_log_bsize = ilog2(bsize) - LOG_MINBSIZE;
- /* Umm, why not e2fs_log_fsize? */
- sblock.e2fs.e2fs_fsize = ilog2(fsize) - LOG_MINBSIZE;
+ sblock.e2fs.e2fs_log_fsize = ilog2(fsize) - LOG_MINFSIZE;
sblock.e2fs_bsize = bsize;
+ sblock.e2fs_fsize = fsize;
sblock.e2fs_bshift = sblock.e2fs.e2fs_log_bsize + LOG_MINBSIZE;
sblock.e2fs_qbmask = sblock.e2fs_bsize - 1;
sblock.e2fs_bmask = ~sblock.e2fs_qbmask;