summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-02-24 02:00:03 +0000
committerwdenk <wdenk>2004-02-24 02:00:03 +0000
commitcbd8a35c6dbaaca35494cbec319960887ad02dcf (patch)
treef3a5f6817a203a6e3a0a0ab7fb9df5b3697c07e3 /net/net.c
parent074cff0d2863bab21b065cf283eccd728f4fecaa (diff)
* Patch by Masami Komiy, 22 Feb 2004:
Add support for NFS for file download * Minor code cleanup
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index 39ffe8c47b..47c2007696 100644
--- a/net/net.c
+++ b/net/net.c
@@ -55,6 +55,15 @@
* derived from our own IP address)
* We want: - load the boot file
* Next step: none
+ *
+ * NFS:
+ *
+ * Prerequisites: - own ethernet address
+ * - own IP address
+ * - name of bootfile (if unknown, we use a default name
+ * derived from our own IP address)
+ * We want: - load the boot file
+ * Next step: none
*/
@@ -65,6 +74,7 @@
#include "bootp.h"
#include "tftp.h"
#include "rarp.h"
+#include "nfs.h"
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
#include <miiphy.h>
@@ -278,6 +288,9 @@ restart:
*/
switch (protocol) {
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
+ case NFS:
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_PING)
case PING:
#endif
@@ -287,6 +300,9 @@ restart:
NetOurSubnetMask= getenv_IPaddr ("netmask");
switch (protocol) {
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
+ case NFS:
+#endif
case TFTP:
NetServerIP = getenv_IPaddr ("serverip");
break;
@@ -357,6 +373,11 @@ restart:
PingStart();
break;
#endif
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
+ case NFS:
+ NfsStart();
+ break;
+#endif
default:
break;
}
@@ -919,6 +940,9 @@ static int net_check_prereq (proto_t protocol)
}
goto common;
#endif
+#if (CONFIG_COMMANDS & CFG_CMD_NFS)
+ case NFS:
+#endif
case TFTP:
if (NetServerIP == 0) {
puts ("*** ERROR: `serverip' not set\n");