if (!strncmp(loaderData->ip, "ibft", 4)) {
+ char *devmacaddr = nl_mac2str(loaderData->netDev);
configMode = USE_IBFT_STATIC;
cfg->isiBFT = 1;
- /* TODO Read the data from ibft table and get the information about configMode */
- /* TODO Problems with getting the info from iBFT */
- if(0){
+ /* Problems with getting the info from iBFT or iBFT uses dhcp*/
+ if(!devmacaddr || !ibft_present() || ibft_iface_dhcp()){
configMode = USE_DHCP;
}
- /* TODO MAC address doesn't match */
- if(0){
+ /* MAC address doesn't match */
+ else if(strcmp(ibft_iface_mac(), devmacaddr)){
configMode = USE_DHCP;
}
+
+ if(devmacaddr) free(devmacaddr);
}
/* this is how we specify dhcp */
@@ -435,16 +438,34 @@ void setupNetworkDeviceConfig(struct networkDeviceConfig * cfg,
}
- /* TODO get MAC from the iBFT table */
- if(0){ /* TODO iBFT not present or error */
+ /* get MAC from the iBFT table */
+ if(!(ibftmacaddr = ibft_iface_mac())){ /* iBFT not present or error */
/* lookForLink = 0; is the w/o iBFT default link or ask? */
break;
}
--
1.5.4.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list