typedef unsigned long long u64; struct super_block { unsigned long s_blocksize; struct block_device *s_bdev; }; struct buffer_head { u64 b_blocknr; }; struct buffer_head *sb_bread(struct super_block *sb, u64 block) { return __bread(sb->s_bdev, block, sb->s_blocksize); } int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh) { } struct { int (*test) (struct sysv_sb_info *, struct buffer_head *); } flavours[] = { { 0, detect_sysv} ,}; int sysv_fill_super(struct super_block *sb, void *data, int silent) { struct buffer_head *bh1; struct buffer_head *bh = ((void *)0); unsigned long blocknr; int size = 0; int i; for (i = 0; i < (sizeof(flavours) / sizeof((flavours)[0]) + (sizeof(struct { } ))) && !size; i++) { size = flavours[i].test(SYSV_SB(sb), bh); } switch (size) { case 3: blocknr = bh->b_blocknr >> 1; bh1 = bh = sb_bread(sb, blocknr); } }