]> Git Repo - J-u-boot.git/blobdiff - cmd/bmp.c
pxe: Move common parsing coding into pxe_util
[J-u-boot.git] / cmd / bmp.c
index edf4f564266bf9eddbe068c6765ad12ede49fb22..071ba90b4354e57424d2b80c4d75025630755a52 100644 (file)
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -15,6 +15,7 @@
 #include <gzip.h>
 #include <image.h>
 #include <lcd.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <splash.h>
@@ -91,7 +92,8 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
 }
 #endif
 
-static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp_info(struct cmd_tbl *cmdtp, int flag, int argc,
+                      char *const argv[])
 {
        ulong addr;
 
@@ -100,7 +102,7 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
                addr = image_load_addr;
                break;
        case 2:         /* use argument */
-               addr = simple_strtoul(argv[1], NULL, 16);
+               addr = hextoul(argv[1], NULL);
                break;
        default:
                return CMD_RET_USAGE;
@@ -109,7 +111,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
        return (bmp_info(addr));
 }
 
-static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp_display(struct cmd_tbl *cmdtp, int flag, int argc,
+                         char *const argv[])
 {
        ulong addr;
        int x = 0, y = 0;
@@ -121,18 +124,18 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
                addr = image_load_addr;
                break;
        case 2:         /* use argument */
-               addr = simple_strtoul(argv[1], NULL, 16);
+               addr = hextoul(argv[1], NULL);
                break;
        case 4:
-               addr = simple_strtoul(argv[1], NULL, 16);
+               addr = hextoul(argv[1], NULL);
                if (!strcmp(argv[2], "m"))
                        x = BMP_ALIGN_CENTER;
                else
-                       x = simple_strtoul(argv[2], NULL, 10);
+                       x = dectoul(argv[2], NULL);
                if (!strcmp(argv[3], "m"))
                        y = BMP_ALIGN_CENTER;
                else
-                       y = simple_strtoul(argv[3], NULL, 10);
+                       y = dectoul(argv[3], NULL);
                break;
        default:
                return CMD_RET_USAGE;
@@ -141,7 +144,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
         return (bmp_display(addr, x, y));
 }
 
-static cmd_tbl_t cmd_bmp_sub[] = {
+static struct cmd_tbl cmd_bmp_sub[] = {
        U_BOOT_CMD_MKENT(info, 3, 0, do_bmp_info, "", ""),
        U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""),
 };
@@ -162,9 +165,9 @@ void bmp_reloc(void) {
  * Return:      None
  *
  */
-static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-       cmd_tbl_t *c;
+       struct cmd_tbl *c;
 
        /* Strip off leading 'bmp' command argument */
        argc--;
This page took 0.030061 seconds and 4 git commands to generate.