From: Evgeniy Ivanov Date: Sun, 8 Jan 2012 19:52:57 +0000 (+0400) Subject: Convert s_block_size on MFSv3. X-Git-Tag: v3.2.0~146 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/FAQ?a=commitdiff_plain;h=d6c5a1280e19fec79f2ffcc740143e755cb627ca;p=minix.git Convert s_block_size on MFSv3. On MFSv3 s_block_size is stored on disk, hence bytes should be converted on big endian. --- diff --git a/servers/mfs/super.c b/servers/mfs/super.c index a55133d33..24aa854fd 100644 --- a/servers/mfs/super.c +++ b/servers/mfs/super.c @@ -279,8 +279,12 @@ PUBLIC int read_super(struct super_block *sp) sp->s_ndzones = V1_NR_DZONES; sp->s_nindirs = V1_INDIRECTS; } else { - if (version == V2) + if (version == V2) { sp->s_block_size = _STATIC_BLOCK_SIZE; + } else { + sp->s_block_size = (unsigned short) + conv2(native,(int) sp->s_block_size); + } if (sp->s_block_size < _MIN_BLOCK_SIZE) { return EINVAL; }