svn commit: r292345 - head/sys/boot/i386/libi386

Baptiste Daroussin bapt at FreeBSD.org
Wed Dec 16 17:45:04 UTC 2015


Author: bapt
Date: Wed Dec 16 17:45:03 2015
New Revision: 292345
URL: https://svnweb.freebsd.org/changeset/base/292345

Log:
  Use human readable representation of ip for the pxeboot.ip kenv
  While here use colon as a separator for pxeboot.hwaddr kenv
  
  Sponsored by:	Gandi.net

Modified:
  head/sys/boot/i386/libi386/pxe.c

Modified: head/sys/boot/i386/libi386/pxe.c
==============================================================================
--- head/sys/boot/i386/libi386/pxe.c	Wed Dec 16 17:13:09 2015	(r292344)
+++ head/sys/boot/i386/libi386/pxe.c	Wed Dec 16 17:45:03 2015	(r292345)
@@ -323,10 +323,9 @@ pxe_open(struct open_file *f, ...)
 #endif
 		setenv("dhcp.host-name", hostname, 1);
 
-		sprintf(temp, "%08X", ntohl(myip.s_addr));
-		setenv("pxeboot.ip", temp, 1);
+		setenv("pxeboot.ip", inet_ntoa(myip), 1);
 		if (bootplayer.Hardware == ETHER_TYPE) {
-		    sprintf(temp, "%6D", bootplayer.CAddr, "-");
+		    sprintf(temp, "%6D", bootplayer.CAddr, ":");
 		    setenv("pxeboot.hwaddr", temp, 1);
 		}
 	}


More information about the svn-src-all mailing list