From: Eugeniu Rosca Date: Tue, 24 Dec 2019 16:51:07 +0000 (+0100) Subject: cmd: adtimg: Rename internal symbols X-Git-Tag: v2020.10~419^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c6edc288b4aa487824e8a276b925170f78fbe3a;p=platform%2Fkernel%2Fu-boot.git cmd: adtimg: Rename internal symbols With 'dtimg.c' renamed to 'adtimg.c', now ensure the naming consistency in the internal implementation of 'adtimg.c'. No functional change intended. Signed-off-by: Eugeniu Rosca Reviewed-by: Sam Protsenko Reviewed-by: Simon Glass --- diff --git a/cmd/adtimg.c b/cmd/adtimg.c index 6c5d53c..22b4f5e 100644 --- a/cmd/adtimg.c +++ b/cmd/adtimg.c @@ -8,13 +8,13 @@ #include #include -enum cmd_dtimg_info { - CMD_DTIMG_START = 0, - CMD_DTIMG_SIZE, +enum cmd_adtimg_info { + CMD_ADTIMG_START = 0, + CMD_ADTIMG_SIZE, }; -static int do_dtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) { char *endp; ulong hdr_addr; @@ -38,7 +38,8 @@ static int do_dtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int dtimg_get_fdt(int argc, char * const argv[], enum cmd_dtimg_info cmd) +static int adtimg_get_fdt(int argc, char * const argv[], + enum cmd_adtimg_info cmd) { ulong hdr_addr; u32 index; @@ -71,14 +72,14 @@ static int dtimg_get_fdt(int argc, char * const argv[], enum cmd_dtimg_info cmd) return CMD_RET_FAILURE; switch (cmd) { - case CMD_DTIMG_START: + case CMD_ADTIMG_START: snprintf(buf, sizeof(buf), "%lx", fdt_addr); break; - case CMD_DTIMG_SIZE: + case CMD_ADTIMG_SIZE: snprintf(buf, sizeof(buf), "%x", fdt_size); break; default: - printf("Error: Unknown cmd_dtimg_info value: %d\n", cmd); + printf("Error: Unknown cmd_adtimg_info value: %d\n", cmd); return CMD_RET_FAILURE; } @@ -87,31 +88,31 @@ static int dtimg_get_fdt(int argc, char * const argv[], enum cmd_dtimg_info cmd) return CMD_RET_SUCCESS; } -static int do_dtimg_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_start(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) { - return dtimg_get_fdt(argc, argv, CMD_DTIMG_START); + return adtimg_get_fdt(argc, argv, CMD_ADTIMG_START); } -static int do_dtimg_size(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_size(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) { - return dtimg_get_fdt(argc, argv, CMD_DTIMG_SIZE); + return adtimg_get_fdt(argc, argv, CMD_ADTIMG_SIZE); } -static cmd_tbl_t cmd_dtimg_sub[] = { - U_BOOT_CMD_MKENT(dump, 2, 0, do_dtimg_dump, "", ""), - U_BOOT_CMD_MKENT(start, 4, 0, do_dtimg_start, "", ""), - U_BOOT_CMD_MKENT(size, 4, 0, do_dtimg_size, "", ""), +static cmd_tbl_t cmd_adtimg_sub[] = { + U_BOOT_CMD_MKENT(dump, 2, 0, do_adtimg_dump, "", ""), + U_BOOT_CMD_MKENT(start, 4, 0, do_adtimg_start, "", ""), + U_BOOT_CMD_MKENT(size, 4, 0, do_adtimg_size, "", ""), }; -static int do_dtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *cp; - cp = find_cmd_tbl(argv[1], cmd_dtimg_sub, ARRAY_SIZE(cmd_dtimg_sub)); + cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub)); - /* Strip off leading 'dtimg' command argument */ + /* Strip off leading 'adtimg' command argument */ argc--; argv++; @@ -124,17 +125,17 @@ static int do_dtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } U_BOOT_CMD( - dtimg, CONFIG_SYS_MAXARGS, 0, do_dtimg, + adtimg, CONFIG_SYS_MAXARGS, 0, do_adtimg, "manipulate dtb/dtbo Android image", "dump \n" " - parse specified image and print its structure info\n" " : image address in RAM, in hex\n" - "dtimg start \n" + "adtimg start \n" " - get address (hex) of FDT in the image, by index\n" " : image address in RAM, in hex\n" " : index of desired FDT in the image\n" " : name of variable where to store address of FDT\n" - "dtimg size \n" + "adtimg size \n" " - get size (hex, bytes) of FDT in the image, by index\n" " : image address in RAM, in hex\n" " : index of desired FDT in the image\n"