mirror of
https://github.com/Ansuel/openwrt.git
synced 2025-12-16 15:01:32 +00:00
kernel: mtdsplit_h3c_vfs: 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
728ca2bc39
commit
2acf18bf4d
@ -99,7 +99,9 @@ static int mtdsplit_h3c_vfs_parse(struct mtd_info *mtd,
|
||||
return -EIO;
|
||||
|
||||
if (format_flag != FORMAT_FLAG)
|
||||
return -EINVAL;
|
||||
pr_debug("mtdsplit_h3c_vfs: unexpected format flag %08x\n",
|
||||
format_flag);
|
||||
return -ENOENT;
|
||||
|
||||
/* Check file entry */
|
||||
err = mtd_read(mtd, FILE_ENTRY_OFFSET, sizeof(file_entry), &retlen,
|
||||
@ -111,19 +113,19 @@ static int mtdsplit_h3c_vfs_parse(struct mtd_info *mtd,
|
||||
return -EIO;
|
||||
|
||||
if (file_entry.flags != FILE_ENTRY_FLAGS)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (file_entry.parent_block != FILE_ENTRY_PARENT_BLOCK)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (file_entry.parent_index != FILE_ENTRY_PARENT_INDEX)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (file_entry.data_block != FILE_ENTRY_DATA_BLOCK)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
if (strncmp(file_entry.name, FILE_ENTRY_NAME, sizeof(file_entry.name)) != 0)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
/* Find rootfs offset */
|
||||
kernel_size = block_offset(file_entry.data_block +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user