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)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 8 Apr 2016 02:13:57 +0000 (11:13 +0900)
commit1070a628985dfaeec2b737aac4144dbbf02b0677
tree4355488fcaa94c374060c9424d072fc29618b894
parenta763468b016a1974c36bfd3a078ec14d68ae53e1
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>
cmd/dfu.c