diff options
author | Luciano Coelho <coelho@ti.com> | 2011-12-01 11:14:48 +0100 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-12-01 11:14:48 +0100 |
commit | e4da3fbfbd1de56d2367653e3823e6445e49f8a9 (patch) | |
tree | f69f424f731b89a75f881967903ff2f38f4b6a92 /init/do_mounts_rd.c | |
parent | wl12xx: fix SDIO suspend/resume (diff) | |
parent | ath9k_hw: add default chainmask for AR9462 (diff) | |
download | linux-e4da3fbfbd1de56d2367653e3823e6445e49f8a9.tar.xz linux-e4da3fbfbd1de56d2367653e3823e6445e49f8a9.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wl12xx-next
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r-- | init/do_mounts_rd.c | 14 |
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) } /* + * Read 512 bytes further to check if cramfs is padded + */ + sys_lseek(fd, start_block * BLOCK_SIZE + 0x200, 0); + sys_read(fd, buf, size); + + if (cramfsb->magic == CRAMFS_MAGIC) { + printk(KERN_NOTICE + "RAMDISK: cramfs filesystem found at block %d\n", + start_block); + nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS; + goto done; + } + + /* * Read block 1 to test for minix and ext2 superblock */ sys_lseek(fd, (start_block+1) * BLOCK_SIZE, 0); |