mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
kernel: bcm47xxpart: fix getting user-space data partition name
Partition name is picked by a parser_trx_data_part_name(). It has to
get correct partition offset (taking care of bad blocks) to work
properly.
This fixes UBI support for devices that have kernel flashed on partition
with a bad block.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7ddba08d87
)
This commit is contained in:
parent
b84a07b380
commit
5a40fad22a
@ -59,9 +59,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
if (trx.offset[i]) {
|
||||
part = &parts[curr_part++];
|
||||
part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
|
||||
- part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
|
||||
- part->offset = trx.offset[i];
|
||||
+ part->offset = parser_trx_real_offset(mtd, trx.offset[i]);
|
||||
+ part->name = parser_trx_data_part_name(mtd, part->offset);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -59,9 +59,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
if (trx.offset[i]) {
|
||||
part = &parts[curr_part++];
|
||||
part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
|
||||
- part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
|
||||
- part->offset = trx.offset[i];
|
||||
+ part->offset = parser_trx_real_offset(mtd, trx.offset[i]);
|
||||
+ part->name = parser_trx_data_part_name(mtd, part->offset);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user