X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=init%2Fdo_mounts_rd.c;h=887629e24c54a5065aa0ee9aca16bbe5d0becc66;hb=da22646d97b7322c757f3a7a21805a3475fed231;hp=fe9acb0ae4808bd663187d802960d788f73276c1;hpb=dc87c55120b0a5b0c4d731183f8bb348981aba65;p=pandora-kernel.git 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 @@ -119,6 +119,20 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) goto done; } + /* + * 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 */