Make sure that cros_write_firmware returns errors when appropriate
The cros_write_firmware utility does not always return error status,
it should return success is and only if the image was successfully
written to a removable device.
With this change the nonzero error is returned both when the utility
is interrupted while waiting for a device to be plugged in and when
there is more than one removable device found without clearly
indicating which one to use..
. plug in two removable devices and run the utility, get the
Please specify destination as '-w sd:<disk_description>'
- <disk_description> can be either . for the only disk,
or the full device name, one of listed below:
/dev/sde - Realtek USB3.0 Card Reader 2.0 GB
/dev/sdg - Realtek USB3.0 Card Reader 3.9 GB
. hit ^C while the utility is waiting for the card to be plugged in,
get the following:
No removable device found, interrupted
In both cases exit status is set to 1
Commit-Queue: Vadim Bendebury <email@example.com>
Tested-by: Vadim Bendebury <firstname.lastname@example.org>
Reviewed-by: Simon Glass <email@example.com>
1 file changed