]> git.wh0rd.org - ICEs.git/blobdiff - bfin-5761/super.i.2
add bfin ice
[ICEs.git] / bfin-5761 / super.i.2
diff --git a/bfin-5761/super.i.2 b/bfin-5761/super.i.2
new file mode 100644 (file)
index 0000000..dce8e74
--- /dev/null
@@ -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);
+       }
+}