aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts_rd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index fe9acb0ae480..887629e24c54 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -120,6 +120,20 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
120 } 120 }
121 121
122 /* 122 /*
123 * Read 512 bytes further to check if cramfs is padded
124 */
125 sys_lseek(fd, start_block * BLOCK_SIZE + 0x200, 0);
126 sys_read(fd, buf, size);
127
128 if (cramfsb->magic == CRAMFS_MAGIC) {
129 printk(KERN_NOTICE
130 "RAMDISK: cramfs filesystem found at block %d\n",
131 start_block);
132 nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
133 goto done;
134 }
135
136 /*
123 * Read block 1 to test for minix and ext2 superblock 137 * Read block 1 to test for minix and ext2 superblock
124 */ 138 */
125 sys_lseek(fd, (start_block+1) * BLOCK_SIZE, 0); 139 sys_lseek(fd, (start_block+1) * BLOCK_SIZE, 0);