From: <z7...@us...> - 2007-02-21 09:46:20
|
Revision: 861 http://svn.sourceforge.net/hackndev/?rev=861&view=rev Author: z72ka Date: 2007-02-21 01:46:12 -0800 (Wed, 21 Feb 2007) Log Message: ----------- Palmz72: New squashfs drivers for 2.6.20 Modified Paths: -------------- linux4palm/linux/trunk/init/do_mounts_rd.c Modified: linux4palm/linux/trunk/init/do_mounts_rd.c =================================================================== --- linux4palm/linux/trunk/init/do_mounts_rd.c 2007-02-21 09:45:46 UTC (rev 860) +++ linux4palm/linux/trunk/init/do_mounts_rd.c 2007-02-21 09:46:12 UTC (rev 861) @@ -110,10 +110,14 @@ printk(KERN_NOTICE "RAMDISK: squashfs filesystem found at block %d\n", start_block); - nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; + if (squashfsb->s_major < 3) + nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; + else + nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; goto done; } + /* * Read block 1 to test for minix and ext2 superblock */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-18 13:01:17
|
Revision: 918 http://svn.sourceforge.net/hackndev/?rev=918&view=rev Author: keddar Date: 2007-03-18 05:28:29 -0700 (Sun, 18 Mar 2007) Log Message: ----------- l4p: add support for initrd in SquashFS-LZMA format Modified Paths: -------------- linux4palm/linux/trunk/init/do_mounts_rd.c Modified: linux4palm/linux/trunk/init/do_mounts_rd.c =================================================================== --- linux4palm/linux/trunk/init/do_mounts_rd.c 2007-03-18 12:23:04 UTC (rev 917) +++ linux4palm/linux/trunk/init/do_mounts_rd.c 2007-03-18 12:28:29 UTC (rev 918) @@ -5,7 +5,14 @@ #include <linux/ext2_fs.h> #include <linux/romfs_fs.h> #include <linux/cramfs_fs.h> -#include <linux/squashfs_fs.h> + +#ifdef CONFIG_SQUASHFS_LZMA + #include <linux/squashfslzma_fs.h> + #include <../fs/squashfs_lzma/sqmagic.h> +#else + #include <linux/squashfs_fs.h> +#endif + #include <linux/initrd.h> #include <linux/string.h> @@ -41,6 +48,7 @@ * * We currently check for the following magic numbers: * squashfs + * squashfs-lzma * minix * ext2 * romfs @@ -56,6 +64,8 @@ struct romfs_super_block *romfsb; struct cramfs_super *cramfsb; struct squashfs_super_block *squashfsb; + struct squashfs_super_block *squashfslzmab; + int nblocks = -1; unsigned char *buf; @@ -68,6 +78,7 @@ romfsb = (struct romfs_super_block *) buf; cramfsb = (struct cramfs_super *) buf; squashfsb = (struct squashfs_super_block *) buf; + squashfslzmab = (struct squashfs_super_block *) buf; memset(buf, 0xe5, size); /* @@ -117,6 +128,17 @@ goto done; } + /* squashfslzma is at block zero too */ + if (squashfslzmab->s_magic == SQUASHFS_MAGIC_LZMA) { + printk(KERN_NOTICE + "RAMDISK: SquashFS-LZMA filesystem found at block %d\n", + start_block); + if (squashfslzmab->s_major < 3) + nblocks = (squashfslzmab->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; + else + nblocks = (squashfslzmab->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; + goto done; + } /* * Read block 1 to test for minix and ext2 superblock This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-03-18 22:03:57
|
Revision: 919 http://svn.sourceforge.net/hackndev/?rev=919&view=rev Author: marex_z71 Date: 2007-03-18 12:18:56 -0700 (Sun, 18 Mar 2007) Log Message: ----------- l4p: add few more ifdefs for squashfs-lzma Modified Paths: -------------- linux4palm/linux/trunk/init/do_mounts_rd.c Modified: linux4palm/linux/trunk/init/do_mounts_rd.c =================================================================== --- linux4palm/linux/trunk/init/do_mounts_rd.c 2007-03-18 12:28:29 UTC (rev 918) +++ linux4palm/linux/trunk/init/do_mounts_rd.c 2007-03-18 19:18:56 UTC (rev 919) @@ -64,7 +64,9 @@ struct romfs_super_block *romfsb; struct cramfs_super *cramfsb; struct squashfs_super_block *squashfsb; +#ifdef CONFIG_SQUASHFS_LZMA struct squashfs_super_block *squashfslzmab; +#endif int nblocks = -1; unsigned char *buf; @@ -78,7 +80,9 @@ romfsb = (struct romfs_super_block *) buf; cramfsb = (struct cramfs_super *) buf; squashfsb = (struct squashfs_super_block *) buf; +#ifdef CONFIG_SQUASHFS_LZMA squashfslzmab = (struct squashfs_super_block *) buf; +#endif memset(buf, 0xe5, size); /* @@ -128,6 +132,7 @@ goto done; } +#ifdef CONFIG_SQUASHFS_LZMA /* squashfslzma is at block zero too */ if (squashfslzmab->s_magic == SQUASHFS_MAGIC_LZMA) { printk(KERN_NOTICE @@ -139,6 +144,7 @@ nblocks = (squashfslzmab->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS; goto done; } +#endif /* * Read block 1 to test for minix and ext2 superblock This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |