aboutsummaryrefslogtreecommitdiff
path: root/misc-utils/flashcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils/flashcp.c')
-rw-r--r--misc-utils/flashcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc-utils/flashcp.c b/misc-utils/flashcp.c
index 50f8c04..e1be292 100644
--- a/misc-utils/flashcp.c
+++ b/misc-utils/flashcp.c
@@ -110,7 +110,7 @@ static NORETURN void showusage(bool error)
" -A | --erase-all Erases the whole device regardless of the image size\n"
" -V | --version Show version information and exit\n"
" <filename> File which you want to copy to flash\n"
- " <device> Flash device to write to (e.g. /dev/mtd0, /dev/mtd1, etc.)\n"
+ " <device> Flash device node or 'mtd:<name>' to write to (e.g. /dev/mtd0, /dev/mtd1, mtd:data, etc.)\n"
"\n",
PROGRAM_NAME);
@@ -275,7 +275,10 @@ int main (int argc,char *argv[])
DEBUG("Got filename: %s\n",filename);
flags |= FLAG_DEVICE;
- device = argv[optind+1];
+ device = mtd_find_dev_node(argv[optind+1]);
+ if (!device)
+ log_failure("Failed to find device %s\n", argv[optind+1]);
+
DEBUG("Got device: %s\n",device);
}