projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: merge ar934x_bo_ddr_flush patch
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
drivers
/
mtd
/
tplinkpart.c
diff --git
a/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c
b/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c
index
2cbad5a
..
674df66
100644
(file)
--- a/
target/linux/ar71xx/files/drivers/mtd/tplinkpart.c
+++ b/
target/linux/ar71xx/files/drivers/mtd/tplinkpart.c
@@
-8,6
+8,7
@@
*/
#include <linux/kernel.h>
*/
#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/magic.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/magic.h>
@@
-84,7
+85,7
@@
err:
return NULL;
}
return NULL;
}
-static int tplink_check_
squash
fs_magic(struct mtd_info *mtd, size_t offset)
+static int tplink_check_
root
fs_magic(struct mtd_info *mtd, size_t offset)
{
u32 magic;
size_t retlen;
{
u32 magic;
size_t retlen;
@@
-98,7
+99,8
@@
static int tplink_check_squashfs_magic(struct mtd_info *mtd, size_t offset)
if (retlen != sizeof(magic))
return -EIO;
if (retlen != sizeof(magic))
return -EIO;
- if (le32_to_cpu(magic) != SQUASHFS_MAGIC)
+ if (le32_to_cpu(magic) != SQUASHFS_MAGIC &&
+ magic != 0x19852003)
return -EINVAL;
return 0;
return -EINVAL;
return 0;
@@
-106,7
+108,7
@@
static int tplink_check_squashfs_magic(struct mtd_info *mtd, size_t offset)
static int tplink_parse_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
static int tplink_parse_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
-
unsigned long origin
)
+
struct mtd_part_parser_data *data
)
{
struct mtd_partition *parts;
struct tplink_fw_header *header;
{
struct mtd_partition *parts;
struct tplink_fw_header *header;
@@
-136,7
+138,7
@@
static int tplink_parse_partitions(struct mtd_info *master,
squashfs_offset = offset + sizeof(struct tplink_fw_header) +
be32_to_cpu(header->kernel_len);
squashfs_offset = offset + sizeof(struct tplink_fw_header) +
be32_to_cpu(header->kernel_len);
- ret = tplink_check_
squash
fs_magic(master, squashfs_offset);
+ ret = tplink_check_
root
fs_magic(master, squashfs_offset);
if (ret == 0)
rootfs_offset = squashfs_offset;
else
if (ret == 0)
rootfs_offset = squashfs_offset;
else
This page took
0.02422 seconds
and
4
git commands to generate.