diff options
author | Andries Brouwer <aeb@cwi.nl> | 2007-02-12 00:52:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 09:48:31 -0800 |
commit | 939b00df0306bc4b5cd25c3c3c78e89b91e72fc8 (patch) | |
tree | c251dca9f3ebbebfa1f40f39716423842b247742 /include/linux | |
parent | b587b13a4f670ebae79ae6259cf44328455e4e69 (diff) |
[PATCH] Minix V3 support
This morning I needed to read a Minix V3 filesystem, but unfortunately my
2.6.19 did not support that, and neither did the downloaded 2.6.20rc4.
Fortunately, google told me that Daniel Aragones had already done the work,
patch found at http://www.terra.es/personal2/danarag/
Unfortunaly, looking at the patch was painful to my eyes, so I polished it
a bit before applying. The resulting kernel boots, and reads the
filesystem it needed to read.
Signed-off-by: Daniel Aragones <danarag@gmail.com>
Signed-off-by: Andries Brouwer <aeb@cwi.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/magic.h | 1 | ||||
-rw-r--r-- | include/linux/minix_fs.h | 25 |
2 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/magic.h b/include/linux/magic.h index b78bbf42135a..b32c8a97fcec 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h @@ -18,6 +18,7 @@ #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ +#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 916e8f72c63d..9850d513ff60 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h @@ -25,7 +25,6 @@ #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) -#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) /* * This is the original minix inode layout on disk. @@ -75,9 +74,33 @@ struct minix_super_block { __u32 s_zones; }; +/* + * V3 minix super-block data on disk + */ +struct minix3_super_block { + __u16 s_ninodes; + __u16 s_nzones; + __u16 s_pad0; + __u16 s_imap_blocks; + __u16 s_zmap_blocks; + __u16 s_firstdatazone; + __u16 s_log_zone_size; + __u16 s_pad1; + __u32 s_max_size; + __u32 s_zones; + __u16 s_magic; + __u16 s_pad2; + __u16 s_blocksize; + __u8 s_disk_version; +}; + struct minix_dir_entry { __u16 inode; char name[0]; }; +struct minix3_dir_entry { + __u32 inode; + char name[0]; +}; #endif |