Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273231
b: refs/heads/master
c: f919b92
h: refs/heads/master
i:
  273229: dc415f8
  273227: 92878dc
  273223: c8c663e
  273215: 208ef3b
v: v3
  • Loading branch information
Neil Armstrong authored and Linus Torvalds committed Nov 2, 2011
1 parent f034dc9 commit 1f7efca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0620d9193cb976ba635d56a6cfd11cb81616d02b
refs/heads/master: f919b9235f930e649b374a50009c6c268bd9a073
14 changes: 14 additions & 0 deletions trunk/init/do_mounts_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 1f7efca

Please sign in to comment.