mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user