Commit 003efd7da48390d32956c24ab0d337ad452c83d2
Committed by
Tom Rini
1 parent
e754da2aee
Exists in
master
and in
54 other branches
image: Export fit_conf_get_prop_node()
This function will be needed by signature checking code, so export it, and also add docs. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 18 additions and 4 deletions Side-by-side Diff
common/image-fit.c
... | ... | @@ -1308,7 +1308,7 @@ |
1308 | 1308 | return noffset; |
1309 | 1309 | } |
1310 | 1310 | |
1311 | -static int __fit_conf_get_prop_node(const void *fit, int noffset, | |
1311 | +int fit_conf_get_prop_node(const void *fit, int noffset, | |
1312 | 1312 | const char *prop_name) |
1313 | 1313 | { |
1314 | 1314 | char *uname; |
... | ... | @@ -1338,7 +1338,7 @@ |
1338 | 1338 | */ |
1339 | 1339 | int fit_conf_get_kernel_node(const void *fit, int noffset) |
1340 | 1340 | { |
1341 | - return __fit_conf_get_prop_node(fit, noffset, FIT_KERNEL_PROP); | |
1341 | + return fit_conf_get_prop_node(fit, noffset, FIT_KERNEL_PROP); | |
1342 | 1342 | } |
1343 | 1343 | |
1344 | 1344 | /** |
... | ... | @@ -1357,7 +1357,7 @@ |
1357 | 1357 | */ |
1358 | 1358 | int fit_conf_get_ramdisk_node(const void *fit, int noffset) |
1359 | 1359 | { |
1360 | - return __fit_conf_get_prop_node(fit, noffset, FIT_RAMDISK_PROP); | |
1360 | + return fit_conf_get_prop_node(fit, noffset, FIT_RAMDISK_PROP); | |
1361 | 1361 | } |
1362 | 1362 | |
1363 | 1363 | /** |
... | ... | @@ -1376,7 +1376,7 @@ |
1376 | 1376 | */ |
1377 | 1377 | int fit_conf_get_fdt_node(const void *fit, int noffset) |
1378 | 1378 | { |
1379 | - return __fit_conf_get_prop_node(fit, noffset, FIT_FDT_PROP); | |
1379 | + return fit_conf_get_prop_node(fit, noffset, FIT_FDT_PROP); | |
1380 | 1380 | } |
1381 | 1381 | |
1382 | 1382 | /** |
include/image.h
... | ... | @@ -631,6 +631,20 @@ |
631 | 631 | int fit_conf_get_ramdisk_node(const void *fit, int noffset); |
632 | 632 | int fit_conf_get_fdt_node(const void *fit, int noffset); |
633 | 633 | |
634 | +/** | |
635 | + * fit_conf_get_prop_node() - Get node refered to by a configuration | |
636 | + * @fit: FIT to check | |
637 | + * @noffset: Offset of conf@xxx node to check | |
638 | + * @prop_name: Property to read from the conf node | |
639 | + * | |
640 | + * The conf@ nodes contain references to other nodes, using properties | |
641 | + * like 'kernel = "kernel@1"'. Given such a property name (e.g. "kernel"), | |
642 | + * return the offset of the node referred to (e.g. offset of node | |
643 | + * "/images/kernel@1". | |
644 | + */ | |
645 | +int fit_conf_get_prop_node(const void *fit, int noffset, | |
646 | + const char *prop_name); | |
647 | + | |
634 | 648 | void fit_conf_print(const void *fit, int noffset, const char *p); |
635 | 649 | |
636 | 650 | int fit_check_ramdisk(const void *fit, int os_noffset, |