global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/cmd/ufs.c b/cmd/ufs.c
index 858cd49..d4a1e66 100644
--- a/cmd/ufs.c
+++ b/cmd/ufs.c
@@ -16,7 +16,7 @@
if (argc >= 2) {
if (!strcmp(argv[1], "init")) {
if (argc == 3) {
- dev = simple_strtoul(argv[2], NULL, 10);
+ dev = dectoul(argv[2], NULL);
ret = ufs_probe_dev(dev);
if (ret)
return CMD_RET_FAILURE;