aboutsummaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-11-28 20:38:01 -0500
committerTom Rini <trini@konsulko.com>2021-11-28 20:38:13 -0500
commitc087b5ad974441d1408c028eb7087d86b6d127e9 (patch)
tree1d5efba0d146dcd1a6a449963ea738cc6e4ff73e /disk
parent1943f2a2a7c58b76812fcad2d3012036af7464ce (diff)
parent452e8c9086a9f95739582da5ccc2130e4bf1ae8b (diff)
downloadu-boot-c087b5ad974441d1408c028eb7087d86b6d127e9.zip
u-boot-c087b5ad974441d1408c028eb7087d86b6d127e9.tar.gz
u-boot-c087b5ad974441d1408c028eb7087d86b6d127e9.tar.bz2
Merge tag 'dm-pull-28nov21' of https://source.denx.de/u-boot/custodians/u-boot-dm into nextWIP/28Nov2021
SPI flash documentation and tidy-ups Various driver model enhancements Fix up some missing unit tests with pytest
Diffstat (limited to 'disk')
-rw-r--r--disk/part_dos.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 9e29aa6..94fae71 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -459,10 +459,12 @@ int layout_mbr_partitions(struct disk_partition *p, int count,
ext = &p[i];
}
- if (i >= 4 && !ext) {
- printf("%s: extended partition is needed for more than 4 partitions\n",
- __func__);
- return -1;
+ if (count < 4)
+ return 0;
+
+ if (!ext) {
+ log_err("extended partition is needed for more than 4 partitions\n");
+ return -EINVAL;
}
/* calculate extended volumes start and size if needed */