1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 10:56:02 +01:00

efi_loader: correctly render MAC address device path nodes

If the interface type is greater 1 render all 32 bytes of the MAC address.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt
2019-09-04 13:32:05 +02:00
parent 8254f8feb7
commit 4411652aea

View File

@@ -124,17 +124,16 @@ static char *dp_msging(char *s, struct efi_device_path *dp)
break; break;
} }
case DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR: { case DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR: {
int i, n = sizeof(struct efi_mac_addr);
struct efi_device_path_mac_addr *mdp = struct efi_device_path_mac_addr *mdp =
(struct efi_device_path_mac_addr *)dp; (struct efi_device_path_mac_addr *)dp;
if (mdp->if_type != 0 && mdp->if_type != 1) if (mdp->if_type <= 1)
break; n = 6;
s += sprintf(s, "MAC(");
s += sprintf(s, "MAC(%02x%02x%02x%02x%02x%02x,0x%1x)", for (i = 0; i < n; ++i)
mdp->mac.addr[0], mdp->mac.addr[1], s += sprintf(s, "%02x", mdp->mac.addr[i]);
mdp->mac.addr[2], mdp->mac.addr[3], s += sprintf(s, ",%u)", mdp->if_type);
mdp->mac.addr[4], mdp->mac.addr[5],
mdp->if_type);
break; break;
} }