hdt: MAC Address should only be displayed on the PXE Device
authorErwan Velu <erwan.velu@free.fr>
Sun, 19 Apr 2009 07:54:14 +0000 (09:54 +0200)
committerErwan Velu <erwan.velu@free.fr>
Sun, 19 Apr 2009 07:54:14 +0000 (09:54 +0200)
Impact: MAC address were shown on invalid devices

Prior to that commit, the mac address of the PXE booted network card was
displayed on every pci devices.... weird.

com32/hdt/hdt-cli-pci.c

index 15ea017..aa6347a 100644 (file)
@@ -135,10 +135,11 @@ static void show_pci_device(int argc, char **argv,
        printf("PCI Func      : %02d\n", func);
 
        if (hardware->is_pxe_valid == true) {
-               printf("Mac Address   : %s\n", hardware->pxe.mac_addr);
                if ((hardware->pxe.pci_device != NULL)
-                   && (hardware->pxe.pci_device == pci_device))
+                   && (hardware->pxe.pci_device == pci_device)) {
+                       printf("Mac Address   : %s\n", hardware->pxe.mac_addr);
                        printf("PXE           : Current boot device\n");
+               }
        }
 }