From: pelikan Date: Sun, 13 Jul 2014 13:37:22 +0000 (+0000) Subject: new superblock header needs fixes for BE architectures X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fdcf90356c6c37afb84ea409db01076787ac79e7;p=openbsd new superblock header needs fixes for BE architectures --- 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;