
From: Simon Glass <sjg@chromium.org> Recent work removed the if_type member. Update the code to use the new method for obtaining the interface type. Use hex so that large partition numbers (>=10) work correctly. Signed-off-by: Simon Glass <sjg@chromium.org> --- cmd/part_find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/part_find.c b/cmd/part_find.c index c39fce21e40..68b66569204 100644 --- a/cmd/part_find.c +++ b/cmd/part_find.c @@ -107,7 +107,7 @@ static int part_find(int argc, char *const argv[]) &loader_part_no)) { char env[256]; - ret = snprintf(env, sizeof(env), "%s %d:%d", blk_get_if_type_name(desc->if_type), desc->devnum, loader_part_no); + ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_if_type_name(desc->if_type), desc->devnum, loader_part_no); if (ret < 0 || ret == sizeof(env)) return CMD_RET_FAILURE; if (env_set("target_part", env)) @@ -123,7 +123,7 @@ static int part_find(int argc, char *const argv[]) break; if (strcasecmp(argv[1], info.type_guid) == 0) { char env[256]; - ret = snprintf(env, sizeof(env), "%s %d:%d", blk_get_if_type_name(desc->if_type), desc->devnum, i); + ret = snprintf(env, sizeof(env), "%s %x:%x", blk_get_uclass_name(desc->uclass_id), desc->devnum, i); if (ret < 0 || ret == sizeof(env)) return CMD_RET_FAILURE; env_set("target_part", env); -- 2.43.0