ao-usbload: Check target device name to avoid mis-flashing
authorKeith Packard <keithp@keithp.com>
Sun, 14 Aug 2016 22:57:39 +0000 (15:57 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 14 Aug 2016 22:57:39 +0000 (15:57 -0700)
commit462039c769f2db9328b04759807c30691f2b96c2
tree95abe520de391e20143baf8e31283de5c6e13fe5
parentc62816a00b9aa40879a2ea98da2d10667e09b704
ao-usbload: Check target device name to avoid mis-flashing

Instead of blindly loading firmware, go get the old device's name and
make sure it matches the new firmware.

Add --force option to allow this to be overridden.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-usbload/ao-usbload.c
ao-tools/lib/ao-editaltos.c
ao-tools/lib/ao-editaltos.h
ao-tools/lib/ao-selfload.c
ao-tools/lib/ao-selfload.h