fastboot: Fix usage of ubiformat for UBI image transfers
Currently all fastboot flash commands with UBI images are handled by a
final call to 'ubiformat'. This only makes sense for flash commands
where the target file is a mtd device. If we just want to transfer a UBI
image we would expect a simple copy to the correct location.

This patch checks if the destination file is a MTD device by opening it
and calling an ioctl MEMGETINFO. Only for MTD devices, ubiformat is
called.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 7290110 commit 24ff0ab0fa0354d74c03c6a1cfddb05c52d9d113
@Markus Pargmann Markus Pargmann authored on 17 Feb 2016
Sascha Hauer committed on 18 Feb 2016
Showing 1 changed file
View
drivers/usb/gadget/f_fastboot.c