From patchwork Sun Jul 12 15:30:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 494150 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 347D6140280 for ; Mon, 13 Jul 2015 02:28:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 863794B6A2; Sun, 12 Jul 2015 18:28:05 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rvGSFZMEI62Y; Sun, 12 Jul 2015 18:28:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB8154B686; Sun, 12 Jul 2015 18:27:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D54E4B616 for ; Sun, 12 Jul 2015 18:11:01 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KrbzjXyVirqh for ; Sun, 12 Jul 2015 18:11:00 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from 17.mo4.mail-out.ovh.net (17.mo4.mail-out.ovh.net [46.105.41.16]) by theia.denx.de (Postfix) with ESMTPS id 624FB4B615 for ; Sun, 12 Jul 2015 18:10:56 +0200 (CEST) Received: from mail631.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo4.mail-out.ovh.net (Postfix) with SMTP id 08127FFAD60 for ; Sun, 12 Jul 2015 17:35:34 +0200 (CEST) Received: from localhost (HELO queueout) (127.0.0.1) by localhost with SMTP; 12 Jul 2015 17:35:33 +0200 Received: from 109241105088.warszawa.vectranet.pl (HELO localhost.localdomain) (l.majewski%majess.pl@109.241.105.88) by ns0.ovh.net with SMTP; 12 Jul 2015 17:35:31 +0200 From: Lukasz Majewski To: u-boot@lists.denx.de, Tom Rini Date: Sun, 12 Jul 2015 17:30:38 +0200 Message-Id: <1436715044-18706-3-git-send-email-l.majewski@majess.pl> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436715044-18706-1-git-send-email-l.majewski@majess.pl> References: <1436715044-18706-1-git-send-email-l.majewski@majess.pl> X-Ovh-Tracer-Id: 9864853510138544668 X-Ovh-Remote: 109.241.105.88 (109241105088.warszawa.vectranet.pl) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrheefucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrheefucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-Mailman-Approved-At: Sun, 12 Jul 2015 18:26:42 +0200 Cc: Marek Vasut , Steve Rae , Stephen Warren , Egli Samuel , Pantelis Antoniou , Rafal Czubak , Joe Hershberger , Bartlomiej Sieka , Przemyslaw Marczak , Tormod Volden Subject: [U-Boot] [PATCH 2/8] net: tftp: Move tftp.h file from ./net to ./include X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This change gives the ability to reuse the 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 --- common/update.c | 2 +- include/tftp.h | 30 ++++++++++++++++++++++++++++++ net/bootp.c | 2 +- net/net.c | 2 +- net/rarp.c | 2 +- net/tftp.c | 2 +- net/tftp.h | 30 ------------------------------ 7 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 include/tftp.h delete mode 100644 net/tftp.h diff --git a/common/update.c b/common/update.c index 1c6aa18..7bd7e94 100644 --- a/common/update.c +++ b/common/update.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include /* env variable holding the location of the update file */ diff --git a/include/tftp.h b/include/tftp.h new file mode 100644 index 0000000..c411c9b --- /dev/null +++ b/include/tftp.h @@ -0,0 +1,30 @@ +/* + * LiMon - BOOTP/TFTP. + * + * Copyright 1994, 1995, 2000 Neil Russell. + * Copyright 2011 Comelit Group SpA + * Luca Ceresoli + * (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__ */ diff --git a/net/bootp.c b/net/bootp.c index 43466af..d325cd0 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -11,8 +11,8 @@ #include #include #include +#include #include "bootp.h" -#include "tftp.h" #include "nfs.h" #ifdef CONFIG_STATUS_LED #include diff --git a/net/net.c b/net/net.c index 67e0ad2..8460a51 100644 --- a/net/net.c +++ b/net/net.c @@ -86,6 +86,7 @@ #include #include #include +#include #if defined(CONFIG_STATUS_LED) #include #include @@ -105,7 +106,6 @@ #if defined(CONFIG_CMD_SNTP) #include "sntp.h" #endif -#include "tftp.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/net/rarp.c b/net/rarp.c index 4ce2f37..2693d4b 100644 --- a/net/rarp.c +++ b/net/rarp.c @@ -8,10 +8,10 @@ #include #include #include +#include #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 diff --git a/net/tftp.c b/net/tftp.c index 3e99e73..f95f737 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -10,7 +10,7 @@ #include #include #include -#include "tftp.h" +#include #include "bootp.h" #ifdef CONFIG_SYS_DIRECT_FLASH_TFTP #include diff --git a/net/tftp.h b/net/tftp.h deleted file mode 100644 index c411c9b..0000000 --- a/net/tftp.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * LiMon - BOOTP/TFTP. - * - * Copyright 1994, 1995, 2000 Neil Russell. - * Copyright 2011 Comelit Group SpA - * Luca Ceresoli - * (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__ */