X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/0c728c8de88d86247d2a75348e71f5af37838c28..a11e60da10b1065dfcf57bb742670b74784703e2:/avr/cmd_fat.c diff --git a/avr/cmd_fat.c b/avr/cmd_fat.c index af2f772..26362b2 100644 --- a/avr/cmd_fat.c +++ b/avr/cmd_fat.c @@ -1,7 +1,7 @@ /* - * (C) Copyright 2014 Leo C. + * (C) Copyright 2014,2016 Leo C. * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ /* @@ -9,13 +9,13 @@ */ #include "common.h" -#include #include #include #include "command.h" #include "ff.h" #include "z80-if.h" +#include "eval_arg.h" #include "con-utils.h" #include "print-utils.h" #include "time.h" @@ -349,17 +349,17 @@ command_ret_t do_fat_rw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[ if (argc < (dowrite ? 4 : 3)) return CMD_RET_USAGE; - addr = strtoul(argv[2], 0, 16); + addr = eval_arg(argv[2], NULL); if (addr >= MAX_MEMORY) { printf_P(PSTR("address too high: 0x%0lx\n"), addr); return CMD_RET_FAILURE; } if (argc > 3) - bytes = strtoul(argv[3], 0, 16); + bytes = eval_arg(argv[3], NULL); else bytes = MAX_MEMORY; if (argc > 4) - pos = strtoul(argv[4], 0, 16); + pos = eval_arg(argv[4], NULL); else pos = 0;