Sebastian Herbszt
2009-Apr-12 20:07 UTC
[syslinux] [PATCH] hdt: only display MAC address for network cards
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);
Seemingly Similar Threads
- Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’
- [PATCH] hdt & gcc -Werror
- [RESEND][PATCH] gpllib: dmi: set default memory speed to "Unknown"
- possible bug in xen.hg/tools/ioemu/tools/vl.c, function net_tap_init()
- [PATCH V3 1/3] uapi: Convert some uses of 6 to ETH_ALEN