bbu: Search for cdev names aswell
In bbu_find_handler_by_device() search for cdev names aswell since some update handlers are registered with their cdev name and not the full path. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
be0c9a3fad
commit
dfcfb5b831
|
@ -109,6 +109,15 @@ static struct bbu_handler *bbu_find_handler_by_device(const char *devicepath)
|
||||||
if (!devicepath)
|
if (!devicepath)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
list_for_each_entry(handler, &bbu_image_handlers, list)
|
||||||
|
if (!strcmp(handler->devicefile, devicepath))
|
||||||
|
return handler;
|
||||||
|
|
||||||
|
if (strncmp(devicepath, "/dev/", 5))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
devicepath += 5;
|
||||||
|
|
||||||
list_for_each_entry(handler, &bbu_image_handlers, list)
|
list_for_each_entry(handler, &bbu_image_handlers, list)
|
||||||
if (!strcmp(handler->devicefile, devicepath))
|
if (!strcmp(handler->devicefile, devicepath))
|
||||||
return handler;
|
return handler;
|
||||||
|
|
Loading…
Reference in New Issue