summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bootp.c4
-rw-r--r--net/rarp.c21
2 files changed, 18 insertions, 7 deletions
diff --git a/net/bootp.c b/net/bootp.c
index f5adce4..b760b88 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -339,12 +339,14 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
*/
NetState = NETLOOP_SUCCESS;
return;
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
} else if (strcmp(s, "NFS") == 0) {
/*
* Use NFS to load the bootfile.
*/
NfsStart();
return;
+#endif
}
}
@@ -893,12 +895,14 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
*/
NetState = NETLOOP_SUCCESS;
return;
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
} else if (strcmp(s, "NFS") == 0) {
/*
* Use NFS to load the bootfile.
*/
NfsStart();
return;
+#endif
}
}
TftpStart();
diff --git a/net/rarp.c b/net/rarp.c
index b8cc542..5f18d84 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -51,13 +51,20 @@ RarpHandler(uchar * dummi0, unsigned dummi1, unsigned dummi2, unsigned dummi3)
#ifdef DEBUG
printf("Got good RARP\n");
#endif
- if (((s = getenv("autoload")) != NULL) && (*s == 'n')) {
- NetState = NETLOOP_SUCCESS;
- return;
- }
- else if ((s != NULL) && !strcmp(s, "NFS")) {
- NfsStart();
- return;
+ if ((s = getenv("autoload")) != NULL) {
+ if (*s == 'n') {
+ /*
+ * Just use RARP to configure system;
+ * Do not use TFTP/NFS to to load the bootfile.
+ */
+ NetState = NETLOOP_SUCCESS;
+ return;
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
+ } else if ((s != NULL) && !strcmp(s, "NFS")) {
+ NfsStart();
+ return;
+#endif
+ }
}
TftpStart ();
}