]> git.wh0rd.org Git - ICEs.git/blob - bfin-5761/super.i.2
more
[ICEs.git] / bfin-5761 / super.i.2
1 typedef unsigned long long u64;
2 struct super_block {
3         unsigned long s_blocksize;
4         struct block_device *s_bdev;
5 };
6 struct buffer_head {
7         u64 b_blocknr;
8 };
9 struct buffer_head *sb_bread(struct super_block *sb, u64 block)
10 {
11         return __bread(sb->s_bdev, block, sb->s_blocksize);
12 }
13 int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh)
14 {
15 }
16 struct {
17         int (*test) (struct sysv_sb_info *, struct buffer_head *);
18 } flavours[] = {
19         {
20         0, detect_sysv}
21 ,};
22 int sysv_fill_super(struct super_block *sb, void *data, int silent)
23 {
24         struct buffer_head *bh1;
25         struct buffer_head *bh = ((void *)0);
26         unsigned long blocknr;
27         int size = 0;
28         int i;
29         for (i = 0; i < (sizeof(flavours) / sizeof((flavours)[0]) + (sizeof(struct {
30                                                                             }
31                                                                      )))
32              && !size; i++) {
33                 size = flavours[i].test(SYSV_SB(sb), bh);
34         }
35         switch (size) {
36         case 3:
37                 blocknr = bh->b_blocknr >> 1;
38                 bh1 = bh = sb_bread(sb, blocknr);
39         }
40 }