[kernel] generic-2.6: move PCI quirk patch from the adm5120 target into the generic...
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.30 / 066-rootfs_split_squashfs4_fix.patch
1 --- a/drivers/mtd/mtdpart.c
2 +++ b/drivers/mtd/mtdpart.c
3 @@ -538,21 +538,21 @@ static int split_squashfs(struct mtd_inf
4 return -EINVAL;
5 }
6
7 - if (*((u32 *) buf) != SQUASHFS_MAGIC) {
8 + if (SQUASHFS_MAGIC != le32_to_cpu(sb->s_magic) ) {
9 printk(KERN_ALERT "split_squashfs: no squashfs found in \"%s\"\n",
10 master->name);
11 *split_offset = 0;
12 return 0;
13 }
14
15 - if (sb->bytes_used <= 0) {
16 + if (le64_to_cpu((sb->bytes_used)) <= 0) {
17 printk(KERN_ALERT "split_squashfs: squashfs is empty in \"%s\"\n",
18 master->name);
19 *split_offset = 0;
20 return 0;
21 }
22
23 - len = (u32) sb->bytes_used;
24 + len = (u32) le64_to_cpu(sb->bytes_used);
25 len += (offset & 0x000fffff);
26 len += (master->erasesize - 1);
27 len &= ~(master->erasesize - 1);
This page took 0.04702 seconds and 5 git commands to generate.