[syslinux] [PATCH] hdt: only display MAC address for network cards
Sebastian Herbszt
herbszt at gmx.de
Sun Apr 12 13:07:43 PDT 2009
Display MAC address only for network cards not all pci devices.
- Sebastian
Index: syslinux-3.74-20-g3b80c26/com32/hdt/hdt-cli-pci.c
===================================================================
--- syslinux-3.74-20-g3b80c26.orig/com32/hdt/hdt-cli-pci.c
+++ syslinux-3.74-20-g3b80c26/com32/hdt/hdt-cli-pci.c
@@ -119,11 +119,11 @@ void show_pci_device(struct s_hardware *
more_printf("PCI Func : %02d\n", func);
if (hardware->is_pxe_valid == true) {
- more_printf("Mac Address : %s\n", hardware->pxe.mac_addr);
if ((hardware->pxe.pci_device != NULL)
- && (hardware->pxe.pci_device == pci_device))
- more_printf("PXE : Current boot device\n",
- func);
+ && (hardware->pxe.pci_device == pci_device)) {
+ more_printf("Mac Address : %s\n", hardware->pxe.mac_addr);
+ more_printf("PXE : Current boot device\n", func);
+ }
}
}
Index: syslinux-3.74-20-g3b80c26/com32/hdt/hdt-menu-pci.c
===================================================================
--- syslinux-3.74-20-g3b80c26.orig/com32/hdt/hdt-menu-pci.c
+++ syslinux-3.74-20-g3b80c26/com32/hdt/hdt-menu-pci.c
@@ -117,13 +117,13 @@ static void compute_pci_device(struct s_
menu->items_count++;
if (hardware->is_pxe_valid == true) {
- snprintf(buffer,sizeof buffer,"MAC Addr. : %s",hardware->pxe.mac_addr);
- snprintf(statbuffer,sizeof statbuffer,"MAC Address : %s",hardware->pxe.mac_addr);
- add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
- menu->items_count++;
-
if ((hardware->pxe.pci_device != NULL)
&& (hardware->pxe.pci_device == pci_device)) {
+ snprintf(buffer,sizeof buffer,"MAC Addr. : %s",hardware->pxe.mac_addr);
+ snprintf(statbuffer,sizeof statbuffer,"MAC Address : %s",hardware->pxe.mac_addr);
+ add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
+ menu->items_count++;
+
snprintf(buffer,sizeof buffer,"PXE : %s","Current Boot device");
snprintf(statbuffer,sizeof statbuffer,"PXE : %s","Current Boot device");
add_item(buffer,statbuffer,OPT_INACTIVE,NULL,0);
More information about the Syslinux
mailing list