cmd: fdt: Map address returned from fdt get addr to sysmem
[platform/kernel/u-boot.git] / cmd / ubifs.c
index e798b83..6a01d09 100644 (file)
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <log.h>
 #include <ubifs_uboot.h>
 
 static int ubifs_initialized;
@@ -32,7 +33,7 @@ int cmd_ubifs_mount(char *vol_name)
 
        ret = uboot_ubifs_mount(vol_name);
        if (ret)
-               return -1;
+               return CMD_RET_FAILURE;
 
        ubifs_mounted = 1;
 
@@ -61,7 +62,7 @@ int cmd_ubifs_umount(void)
 {
        if (ubifs_initialized == 0) {
                printf("No UBIFS volume mounted!\n");
-               return -1;
+               return CMD_RET_FAILURE;
        }
 
        uboot_ubifs_umount();
@@ -88,7 +89,7 @@ static int do_ubifs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
 
        if (!ubifs_mounted) {
                printf("UBIFS not mounted, use ubifsmount to mount volume first!\n");
-               return -1;
+               return CMD_RET_FAILURE;
        }
 
        if (argc == 2)
@@ -115,20 +116,20 @@ static int do_ubifs_load(struct cmd_tbl *cmdtp, int flag, int argc,
 
        if (!ubifs_mounted) {
                printf("UBIFS not mounted, use ubifs mount to mount volume first!\n");
-               return -1;
+               return CMD_RET_FAILURE;
        }
 
        if (argc < 3)
                return CMD_RET_USAGE;
 
-       addr = simple_strtoul(argv[1], &endp, 16);
+       addr = hextoul(argv[1], &endp);
        if (endp == argv[1])
                return CMD_RET_USAGE;
 
        filename = argv[2];
 
        if (argc == 4) {
-               size = simple_strtoul(argv[3], &endp, 16);
+               size = hextoul(argv[3], &endp);
                if (endp == argv[3])
                        return CMD_RET_USAGE;
        }