Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 2015 17:45:03 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292345 - head/sys/boot/i386/libi386
Message-ID:  <201512161745.tBGHj3Xh016077@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512161745.tBGHj3Xh016077>