bootstd: Work around missing partition 1
If there is no partition numbered 1, we decide that there are no partitions at all. That may not be correct, since at least one Debian installed has just a single partition numbered 2. Continue searching up to partition 3, just in case. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e94fbdd272
commit
76afc8457e
1 changed files with 8 additions and 1 deletions
|
@ -154,8 +154,15 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
|
||||||
ret = -ESHUTDOWN;
|
ret = -ESHUTDOWN;
|
||||||
else
|
else
|
||||||
bflow->state = BOOTFLOWST_MEDIA;
|
bflow->state = BOOTFLOWST_MEDIA;
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
/* allow partition 1 to be missing */
|
||||||
|
if (iter->part == 1) {
|
||||||
|
iter->max_part = 3;
|
||||||
|
ret = -ENOENT;
|
||||||
|
}
|
||||||
|
|
||||||
return log_msg_ret("part", ret);
|
return log_msg_ret("part", ret);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Currently we don't get the number of partitions, so just
|
* Currently we don't get the number of partitions, so just
|
||||||
|
|
Loading…
Reference in a new issue