dfu:cmd: get the default command arguments from environment
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Thu, 7 Aug 2014 11:03:25 +0000 (13:03 +0200)
committerLukasz Majewski <l.majewski@samsung.com>
Thu, 30 Oct 2014 12:16:48 +0000 (13:16 +0100)
commit436b028dbe10ae717d9fff30b670bcaa53c9d206
treec7557f72606cfb5147f68c80858e5900482c7afc
parentff6d6965b4fb9b3d9387bde06956b7d2f9e9ba6b
dfu:cmd: get the default command arguments from environment

This change adds support to store the default DFU cmd line
arguments in the environment.

This is useful for users who usually use the same arguments
for dfu command and do the upgrade frequently.

DFU command use cases:
- dfu <usb ctrl> <if> <dev> [<list>] - use command line args
- dfu [<list>] - take the default command line args from env
And for both - optional list the initialized DFU entities.

To use the default dfu device configuration user should define:
- $dfu_usb_con - e.g. "0"
- $dfu_interface - e.g. "mmc"
- $dfu_device - e.g. "0"

Change-Id: I1c87677c0384a5f5a808ab9b7845d6da6f9ec980
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
common/cmd_dfu.c