Make the PXELINUX output slightly more concise. The IP address is displayed
as part of the IPAPPEND strings, so this removes a separate printout of the
IP address immediately before that. Also, now if there is an error getting
a cached packet, the packet type is displayed in the error message, instead
of printing each cached packet type as it is retrieved.
Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
core/fs/pxe/pxe.c | 23 ++++-------------------
core/fs/pxe/pxe.h | 1 -
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index a1e4097..15c2f4d 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -22,7 +22,6 @@ char __bss16 SYSUUIDStr[8+32+5];
char boot_file[256]; /* From DHCP */
char path_prefix[256]; /* From DHCP */
-char dot_quad_buf[16];
static bool has_gpxe;
static uint32_t gpxe_funcs;
@@ -349,7 +348,6 @@ static int pxe_get_cached_info(int type)
{
int err;
static __lowmem struct s_PXENV_GET_CACHED_INFO get_cached_info;
- printf(" %02x", type);
get_cached_info.Status = 0;
get_cached_info.PacketType = type;
@@ -357,7 +355,8 @@ static int pxe_get_cached_info(int type)
get_cached_info.Buffer = FAR_PTR(trackbuf);
err = pxe_call(PXENV_GET_CACHED_INFO, &get_cached_info);
if (err) {
- printf("PXE API call failed, error %04x\n", err);
+ printf("Unable to get cached packet %02x, error %04x\n",
+ type, err);
kaboom();
}
@@ -1191,18 +1190,6 @@ static void genipopt(void)
}
-/* Generate ip= option and print the ip adress */
-static void ip_init(void)
-{
- uint32_t ip = IPInfo.myip;
-
- genipopt();
- gendotquad(dot_quad_buf, ip);
-
- ip = ntohl(ip);
- printf("My IP address seems to be %08X %s\n", ip, dot_quad_buf);
-}
-
/*
* Print the IPAPPEND strings, in order
*/
@@ -1410,7 +1397,7 @@ static int pxe_init(bool quiet)
have_entrypoint:
if (!quiet) {
- printf("%s entry point found (we hope) at %04X:%04X via plan %c\n",
+ printf("%s entry point at %04X:%04X via plan %c\n",
type, PXEEntry.seg, PXEEntry.offs, plan);
printf("UNDI code segment at %04X len %04X\n", code_seg, code_len);
printf("UNDI data segment at %04X len %04X\n", data_seg, data_len);
@@ -1475,7 +1462,6 @@ static void network_init(void)
/*
* Get the DHCP client identifiers (query info 1)
*/
- printf("Getting cached packet ");
pkt_len = pxe_get_cached_info(1);
parse_dhcp(pkt_len);
/*
@@ -1510,11 +1496,10 @@ static void network_init(void)
*/
pkt_len = pxe_get_cached_info(3);
parse_dhcp(pkt_len);
- printf("\n");
make_bootif_string();
make_sysuuid_string();
- ip_init();
+ genipopt();
print_ipappend();
/*
diff --git a/core/fs/pxe/pxe.h b/core/fs/pxe/pxe.h
index 1e6fa76..8f359e3 100644
--- a/core/fs/pxe/pxe.h
+++ b/core/fs/pxe/pxe.h
@@ -197,7 +197,6 @@ extern char path_prefix[];
extern char LocalDomain[];
extern char IPOption[];
-extern char dot_quad_buf[];
extern uint32_t dns_server[];
--
1.7.4