summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-09-12 21:00:37 +0000
committermav <mav@FreeBSD.org>2012-09-12 21:00:37 +0000
commitb1b3e5df41b151728fdfd1f334b1e8f6ce9067ed (patch)
treec5ed9eb26ca43571238ee30c004076e007332549 /sys/boot/i386
parent3cc562d0f751b0068d1bd95b84a6ab32f13f0122 (diff)
downloadFreeBSD-src-b1b3e5df41b151728fdfd1f334b1e8f6ce9067ed.zip
FreeBSD-src-b1b3e5df41b151728fdfd1f334b1e8f6ce9067ed.tar.gz
Make pxe device in lsdev really include device name, looking like this:
pxe0: 192.168.3.1:/storage/nfsroot/amd64 , instead of confusing and less useful: 192.168.3.1:pxeboot
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/libi386/pxe.c15
-rw-r--r--sys/boot/i386/libi386/pxe.h9
2 files changed, 4 insertions, 20 deletions
diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c
index dbb58de..e4ec5c0 100644
--- a/sys/boot/i386/libi386/pxe.c
+++ b/sys/boot/i386/libi386/pxe.c
@@ -355,18 +355,11 @@ pxe_close(struct open_file *f)
static void
pxe_print(int verbose)
{
- if (pxe_call != NULL) {
- if (*bootplayer.Sname == '\0') {
- printf(" "IP_STR":%s\n",
- IP_ARGS(htonl(bootplayer.sip)),
- bootplayer.bootfile);
- } else {
- printf(" %s:%s\n", bootplayer.Sname,
- bootplayer.bootfile);
- }
- }
- return;
+ if (pxe_call == NULL)
+ return;
+
+ printf(" pxe0: %s:%s\n", inet_ntoa(rootip), rootpath);
}
static void
diff --git a/sys/boot/i386/libi386/pxe.h b/sys/boot/i386/libi386/pxe.h
index f1f22aa..651bdcd 100644
--- a/sys/boot/i386/libi386/pxe.h
+++ b/sys/boot/i386/libi386/pxe.h
@@ -52,15 +52,6 @@
#define S_SIZE(s) s, sizeof(s) - 1
-#define IP_STR "%d.%d.%d.%d"
-#define IP_ARGS(ip) \
- (int)(ip >> 24) & 0xff, (int)(ip >> 16) & 0xff, \
- (int)(ip >> 8) & 0xff, (int)ip & 0xff
-
-#define MAC_STR "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_ARGS(mac) \
- mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
-
#define PXENFSROOTPATH "/pxeroot"
typedef struct {
OpenPOWER on IntegriCloud