diff options
| author | Heinrich Schuchardt <[email protected]> | 2023-07-22 12:45:44 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2023-07-30 18:52:03 +0200 |
| commit | d62e7b8059847a06bc0f2222643425bff775320b (patch) | |
| tree | 9bf6ed3e0ac4d72009bd241fb820d1a42a878267 | |
| parent | 350635fe837341e7ce7b7b900f18d7d306fdb42e (diff) | |
spl: blk: partition numbers are hexadecimal
Loading u-boot.itb from device 0x00, partition 0x0f fails with:
Trying to boot from NVME
Device 0: Vendor: 0x4x Rev: 8.0.50 Prod: nvme-1
Type: Hard Disk
Capacity: 3814.6 MB = 3.7 GB (7812500 x 512)
** Invalid partition 21 **
Couldn't find partition nvme 0:15
Like the command line interface fs_det_blk_dev() expects that the device
number and the partition number are hexadecimal.
Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Mayuresh Chitale <[email protected]>
| -rw-r--r-- | common/spl/spl_blk_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c index d4161fa850a..16ecece7023 100644 --- a/common/spl/spl_blk_fs.c +++ b/common/spl/spl_blk_fs.c @@ -66,7 +66,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image, } dev.ifname = blk_get_uclass_name(uclass_id); - snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%d:%d", + snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%x:%x", devnum, partnum); ret = fs_set_blk_dev(dev.ifname, dev.dev_part_str, FS_TYPE_ANY); if (ret) { |
