net: tftp: Move tftp.h file from ./net to ./include/net
authorLukasz Majewski <l.majewski@majess.pl>
Sun, 23 Aug 2015 22:21:43 +0000 (00:21 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 7 Sep 2015 11:41:04 +0000 (13:41 +0200)
This change gives the ability to reuse the <tftp.h> header file by other
subsystems (like e.g. dfu).

Without this change compilation error emerges for the legacy update.c file.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
include/net/tftp.h [new file with mode: 0644]
net/bootp.c
net/net.c
net/rarp.c
net/tftp.c
net/tftp.h [deleted file]

diff --git a/include/net/tftp.h b/include/net/tftp.h
new file mode 100644 (file)
index 0000000..c411c9b
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *     LiMon - BOOTP/TFTP.
+ *
+ *     Copyright 1994, 1995, 2000 Neil Russell.
+ *     Copyright 2011 Comelit Group SpA
+ *                    Luca Ceresoli <luca.ceresoli@comelit.it>
+ *     (See License)
+ */
+
+#ifndef __TFTP_H__
+#define __TFTP_H__
+
+/**********************************************************************/
+/*
+ *     Global functions and variables.
+ */
+
+/* tftp.c */
+void tftp_start(enum proto_t protocol);        /* Begin TFTP get/put */
+
+#ifdef CONFIG_CMD_TFTPSRV
+void tftp_start_server(void);  /* Wait for incoming TFTP put */
+#endif
+
+extern ulong tftp_timeout_ms;
+extern int tftp_timeout_count_max;
+
+/**********************************************************************/
+
+#endif /* __TFTP_H__ */
index 43466af2f39293f415b9c473e3da060a0e99766d..b2f8ad4ded932ddfdb2aefc86f803e2d4f0d894f 100644 (file)
@@ -11,8 +11,8 @@
 #include <common.h>
 #include <command.h>
 #include <net.h>
+#include <net/tftp.h>
 #include "bootp.h"
-#include "tftp.h"
 #include "nfs.h"
 #ifdef CONFIG_STATUS_LED
 #include <status_led.h>
index 2a6efd85eae2179c97a0f798e0ec881a3d66a3b8..a115ce28927216532179bdcc842d22025e0ee092 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -86,6 +86,7 @@
 #include <environment.h>
 #include <errno.h>
 #include <net.h>
+#include <net/tftp.h>
 #if defined(CONFIG_STATUS_LED)
 #include <miiphy.h>
 #include <status_led.h>
 #if defined(CONFIG_CMD_SNTP)
 #include "sntp.h"
 #endif
-#include "tftp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 4ce2f37a8a69c2b8ad70e3ea5e0f2605bf589bbc..1fa11b690d218fbda9fd80d26d99746acae10bf9 100644 (file)
@@ -8,10 +8,10 @@
 #include <common.h>
 #include <command.h>
 #include <net.h>
+#include <net/tftp.h>
 #include "nfs.h"
 #include "bootp.h"
 #include "rarp.h"
-#include "tftp.h"
 
 #define TIMEOUT 5000UL /* Milliseconds before trying BOOTP again */
 #ifndef        CONFIG_NET_RETRY_COUNT
index 18ce84c20214ccec75036d135ed0da246e485c5b..181f0f363e70d7ad45044910d1216def34e412a7 100644 (file)
@@ -10,7 +10,7 @@
 #include <command.h>
 #include <mapmem.h>
 #include <net.h>
-#include "tftp.h"
+#include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_SYS_DIRECT_FLASH_TFTP
 #include <flash.h>
diff --git a/net/tftp.h b/net/tftp.h
deleted file mode 100644 (file)
index c411c9b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *     LiMon - BOOTP/TFTP.
- *
- *     Copyright 1994, 1995, 2000 Neil Russell.
- *     Copyright 2011 Comelit Group SpA
- *                    Luca Ceresoli <luca.ceresoli@comelit.it>
- *     (See License)
- */
-
-#ifndef __TFTP_H__
-#define __TFTP_H__
-
-/**********************************************************************/
-/*
- *     Global functions and variables.
- */
-
-/* tftp.c */
-void tftp_start(enum proto_t protocol);        /* Begin TFTP get/put */
-
-#ifdef CONFIG_CMD_TFTPSRV
-void tftp_start_server(void);  /* Wait for incoming TFTP put */
-#endif
-
-extern ulong tftp_timeout_ms;
-extern int tftp_timeout_count_max;
-
-/**********************************************************************/
-
-#endif /* __TFTP_H__ */