diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-26 15:01:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-28 08:14:14 +0100 |
commit | 991a12da04e85c58bf404637b4ad6c6d2ba018fe (patch) | |
tree | 2bacb0042d6a4b03fc53de97330711b75c744344 /commands | |
parent | 9b731118f9d42b2f4ebd3528ef3e4f9496461082 (diff) | |
download | barebox-991a12da04e85c58bf404637b4ad6c6d2ba018fe.tar.gz barebox-991a12da04e85c58bf404637b4ad6c6d2ba018fe.tar.xz |
usb: dfu: Add create flag
With the create flag DFU can upload to regular, previously non existing
files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/dfu.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 <str>", "product string\n") BAREBOX_CMD_HELP_OPT ("-V <id>", "vendor id\n") BAREBOX_CMD_HELP_OPT ("-P <id>", "product id\n") BAREBOX_CMD_HELP_OPT ("<description>", - "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 /** |