eth_get_byname uses a selfmade dev_name, use dev_name directly instead. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- net/eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/eth.c b/net/eth.c index 2b492ad..e023d65 100644 --- a/net/eth.c +++ b/net/eth.c @@ -100,11 +100,9 @@ struct eth_device * eth_get_current(void) struct eth_device *eth_get_byname(char *ethname) { struct eth_device *edev; - char name[MAX_DRIVER_NAME]; list_for_each_entry(edev, &netdev_list, list) { - sprintf(name, "%s%d", edev->dev.name, edev->dev.id); - if (!strcmp(ethname, name)) + if (!strcmp(ethname, dev_name(&edev->dev))) return edev; } return NULL; -- 1.7.10 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox