Commit a7af998e authored by spiiroin's avatar spiiroin

[usb_moded] Reject mtp_mode if mtp daemon can't be started

Gadget is programmed according to mtp_mode requirements
regardless of availability of mtp daemon - which leaves
non-functional mtp_mode supposedly active.

Switch to fallback mode if mtp daemon can't be started.
Signed-off-by: spiiroin's avatarSimo Piiroinen <>
parent 439360bf
......@@ -613,8 +613,10 @@ static void usbmoded_switch_to_mode(const char *mode)
* as they will use the usbmoded_get_usb_mode_data function */
if( usbmoded_mode_is_mtp_mode(mode) )
if( usbmoded_mode_is_mtp_mode(mode) ) {
if( !usbmoded_start_mtpd() )
goto FAILED;
if( !usbmoded_set_usb_module(data->mode_module) )
goto FAILED;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment