9
0
Fork 0

usb: fastboot: drop CONFIG_COMMAND_SUPPORT dependency

fastboot can run without command support. In this case we cannot
execute oem commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-04-22 11:25:44 +02:00
parent 8228f9e1fd
commit b1374a6d97
2 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,6 @@ config USB_GADGET_SERIAL
config USB_GADGET_FASTBOOT
bool
select BANNER
depends on COMMAND_SUPPORT
prompt "Android Fastboot support"
endif

View File

@ -872,6 +872,11 @@ static void cb_oem_exec(struct usb_ep *ep, struct usb_request *req, const char *
struct f_fastboot *f_fb = req->context;
int ret;
if (!IS_ENABLED(CONFIG_COMMAND)) {
fastboot_tx_print(f_fb, "FAILno command support available");
return;
}
ret = run_command(cmd);
if (ret < 0)
fastboot_tx_print(f_fb, "FAIL%s", strerror(-ret));