]> Zhao Yanbai Git Server - minix.git/commitdiff
Convert s_block_size on MFSv3.
authorEvgeniy Ivanov <lolkaantimat@gmail.com>
Sun, 8 Jan 2012 19:52:57 +0000 (23:52 +0400)
committerEvgeniy Ivanov <lolkaantimat@gmail.com>
Sun, 8 Jan 2012 19:52:57 +0000 (23:52 +0400)
On MFSv3 s_block_size is stored on disk, hence bytes should be converted
on big endian.

servers/mfs/super.c

index a55133d337c25c98b7964c1c0d4336adcdab0383..24aa854fd1c2c719049cdfd515ec5dd6b0a17a1b 100644 (file)
@@ -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;
        }