From 991a12da04e85c58bf404637b4ad6c6d2ba018fe Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 26 Feb 2014 15:01:43 +0100 Subject: usb: dfu: Add create flag With the create flag DFU can upload to regular, previously non existing files. Signed-off-by: Sascha Hauer --- commands/dfu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'commands/dfu.c') diff --git a/commands/dfu.c b/commands/dfu.c index b310585cc9..3c00e7e7e1 100644 --- a/commands/dfu.c +++ b/commands/dfu.c @@ -65,6 +65,9 @@ static int dfu_do_parse_one(char *partstr, char **endstr, struct usb_dfu_dev *df case 'r': dfu->flags |= DFU_FLAG_READBACK; break; + case 'c': + dfu->flags |= DFU_FLAG_CREATE; + break; default: return -EINVAL; } @@ -167,9 +170,10 @@ BAREBOX_CMD_HELP_OPT ("-p ", "product string\n") BAREBOX_CMD_HELP_OPT ("-V ", "vendor id\n") BAREBOX_CMD_HELP_OPT ("-P ", "product id\n") BAREBOX_CMD_HELP_OPT ("", - "device1(name1)[sr],device2(name2)[sr]\n" + "device1(name1)[sr],device2(name2)[src]\n" "'s' means 'safe mode' (download the complete image before flashing) and\n" - "'r' that readback of the firmware is allowed.\n") + "'r' that readback of the firmware is allowed.\n" + "'c' if given, the file will be created (for use with regular files)\n") BAREBOX_CMD_HELP_END /** -- cgit v1.2.3