/*
- * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
+ * (C) Copyright 2014,2016 Leo C. <erbl259-lmu@yahoo.de>
*
* Copyright 2000-2009
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
- * SPDX-License-Identifier: GPL-2.0+
+ * SPDX-License-Identifier: GPL-2.0
*/
#include "common.h"
-#include <stdlib.h>
+#include "eval_arg.h"
#include <stdbool.h>
#include "command.h"
(void) cmdtp; (void) flag;
/* reset getopt() */
- optind = 1;
+ optind = 0;
int opt;
while ((opt = getopt(argc, argv, PSTR("n"))) != -1) {
if (argc != 2)
return CMD_RET_USAGE;
- delay = strtoul(argv[1], &sp, 10);
+ delay = eval_arg(argv[1], &sp);
if (*sp == 'm') {
millisec = 1;