environment: bypass overlap check for mtd devices
For mtd devices the overlap check does not work as expected for two
reasons. First is that cdev->offset is 0 for mtd partitions, instead
cdev->mtd->master_offset has to be used. That could be fixed easily.
Second on NAND devices the environment is on the bb devices and not
on the raw nand devices which means we would need something to get
the mtd device from the bb device before doing the check.

Both issues are fixable, but the check was mainly done to catch cases
when an environment partition is created in the free space before the
first MBR/GPT partition on SD/MMC devices, so leave out the mtd case
for now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 1106af3 commit 8d99417f72bfd4ba716dcdc87ab4450331203531
@Sascha Hauer Sascha Hauer authored on 12 Oct 2018
Showing 1 changed file
View
common/startup.c