mirror of
https://github.com/Ansuel/openwrt.git
synced 2025-12-16 15:01:32 +00:00
kernel: mtdsplit_minor: use -ENOENT instead of -ENODEV
New linux version will check the return code of parser on subpartitions. The only valid case for skipping a parser with an error is -ENOENT. Change the relevant entry to -ENOENT. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
91a9fb7460
commit
f9eaa1cf1f
@ -71,17 +71,17 @@ static int mtdsplit_parse_minor(struct mtd_info *master,
|
||||
|
||||
/* match header */
|
||||
if (hdr.yaffs_type != YAFFS_OBJECT_TYPE_FILE)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (hdr.yaffs_obj_id != YAFFS_OBJECTID_ROOT)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (hdr.yaffs_sum_unused != YAFFS_SUM_UNUSED)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if ((memcmp(hdr.yaffs_name, YAFFS_NAME_KERNEL, sizeof(YAFFS_NAME_KERNEL))) &&
|
||||
(memcmp(hdr.yaffs_name, YAFFS_NAME_BOOTIMAGE, sizeof(YAFFS_NAME_BOOTIMAGE))))
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
err = mtd_find_rootfs_from(master, master->erasesize, master->size,
|
||||
&rootfs_offset, NULL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user