X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=bfin-5761%2Fsuper.i.2;fp=bfin-5761%2Fsuper.i.2;h=dce8e7487beafc086e01bcbb22fff6baf15128ee;hp=0000000000000000000000000000000000000000;hb=0e45bb161e4c1a7d89732e3b1e928f16ae16ef55;hpb=81f80d8c1c9898ae1c26534a3287a47220390f5c diff --git a/bfin-5761/super.i.2 b/bfin-5761/super.i.2 new file mode 100644 index 0000000..dce8e74 --- /dev/null +++ b/bfin-5761/super.i.2 @@ -0,0 +1,40 @@ +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); + } +}