summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorgwr <gwr@NetBSD.org>1998-06-16 19:08:10 +0000
committergwr <gwr@NetBSD.org>1998-06-16 19:08:10 +0000
commitd63354072cfc194b779b57dd040fb238a0e2fb6a (patch)
treee8dfbc8b452ee08faa78e7e416b36160d9ca5bec /sys/lib
parent3927b67b7113d4b630a79508b11cafd6a060c2f4 (diff)
When the gateway bootparam is missing, be clear about that
in the error message instead of showing zero or nothing.
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libsa/dev_net.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/lib/libsa/dev_net.c b/sys/lib/libsa/dev_net.c
index 377dbdf1c49..55eb6148b63 100644
--- a/sys/lib/libsa/dev_net.c
+++ b/sys/lib/libsa/dev_net.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dev_net.c,v 1.12 1997/12/10 20:38:37 gwr Exp $ */
+/* $NetBSD: dev_net.c,v 1.13 1998/06/16 19:08:10 gwr Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -237,16 +237,18 @@ net_getparams(sock)
*/
smask = 0;
gateip.s_addr = 0;
- if (bp_getfile(sock, "gateway", &gateip, buf) == 0) {
+ if (bp_getfile(sock, "gateway", &gateip, buf))
+ printf("nfs_open: gateway bootparam missing\n");
+ else {
/* Got it! Parse the netmask. */
+ /* XXX - Use inet_addr() from libkern! */
smask = ip_convertaddr(buf);
- }
- if (smask) {
+ if (smask == 0)
+ printf("nfs_open: gateway netmask missing\n");
netmask = smask;
printf("net_open: subnet mask: %s\n", intoa(netmask));
- }
- if (gateip.s_addr)
printf("net_open: net gateway: %s\n", inet_ntoa(gateip));
+ }
/* Get the root server and pathname. */
if (bp_getfile(sock, "root", &rootip, rootpath)) {