diff options
author | Simon Glass <sjg@chromium.org> | 2020-03-18 20:44:06 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-04-01 16:45:09 +0300 |
commit | 72188f546291cfadea99e9383c133d6aaa37d87d (patch) | |
tree | c950369be789dcb92fcd90c15ed48a889a736e78 /tools/image-host.c | |
parent | b008677daf2a9dc0335260c7c4e24390487fe0ca (diff) | |
download | u-boot-72188f546291cfadea99e9383c133d6aaa37d87d.tar.xz |
image: Use constants for 'required' and 'key-name-hint'
These are used in multiple places so update them to use a shared #define.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
Diffstat (limited to 'tools/image-host.c')
-rw-r--r-- | tools/image-host.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index dfea48e894..4e57ddea96 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -170,7 +170,7 @@ static int fit_image_setup_sig(struct image_sign_info *info, memset(info, '\0', sizeof(*info)); info->keydir = keydir; - info->keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL); + info->keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL); info->fit = fit; info->node_offset = noffset; info->name = strdup(algo_name); @@ -249,7 +249,7 @@ static int fit_image_process_sig(const char *keydir, void *keydest, free(value); /* Get keyname again, as FDT has changed and invalidated our pointer */ - info.keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL); + info.keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL); /* * Write the public key into the supplied FDT file; this might fail @@ -337,7 +337,7 @@ static int fit_image_setup_cipher(struct image_cipher_info *info, info->keydir = keydir; /* Read the key name */ - info->keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL); + info->keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL); if (!info->keyname) { printf("Can't get key name for cipher '%s' in image '%s'\n", node_name, image_name); @@ -886,7 +886,7 @@ static int fit_config_process_sig(const char *keydir, void *keydest, free(region_prop); /* Get keyname again, as FDT has changed and invalidated our pointer */ - info.keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL); + info.keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL); /* Write the public key into the supplied FDT file */ if (keydest) { |