From patchwork Thu Jun 9 07:06:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 632647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rQGZX5Py6z9t3f for ; Thu, 9 Jun 2016 17:07:00 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rQGZX4bHQzDqHh for ; Thu, 9 Jun 2016 17:07:00 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rQGZQ6yM9zDq68 for ; Thu, 9 Jun 2016 17:06:54 +1000 (AEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AAD06F674 for ; Thu, 9 Jun 2016 07:06:53 +0000 (UTC) Received: from thh440s.fritz.box (vpn1-5-76.ams2.redhat.com [10.36.5.76]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5976ohJ018623 for ; Thu, 9 Jun 2016 03:06:52 -0400 From: Thomas Huth To: slof@lists.ozlabs.org Date: Thu, 9 Jun 2016 09:06:48 +0200 Message-Id: <1465456010-9166-2-git-send-email-thuth@redhat.com> In-Reply-To: <1465456010-9166-1-git-send-email-thuth@redhat.com> References: <1465456010-9166-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 09 Jun 2016 07:06:53 +0000 (UTC) Subject: [SLOF] [PATCH 1/3] net: Get rid of netlib and netapps prefixes in include statements X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" These prefixes prevent that the files can easily be moved to another folder, so let's use proper "-I" statements in the Makefiles instead. Signed-off-by: Thomas Huth --- clients/net-snk/app/netapps/Makefile | 2 +- clients/net-snk/app/netapps/netapps.h | 2 +- clients/net-snk/app/netapps/netboot.c | 16 ++++++++-------- clients/net-snk/app/netapps/ping.c | 8 ++++---- clients/net-snk/app/netlib/Makefile | 2 +- clients/net-snk/app/netlib/dhcp.c | 2 +- clients/net-snk/app/netlib/dhcp.h | 7 +------ clients/net-snk/app/netlib/dhcpv6.c | 12 ++++++------ clients/net-snk/app/netlib/dhcpv6.h | 2 +- clients/net-snk/app/netlib/icmpv6.c | 10 +++++----- clients/net-snk/app/netlib/icmpv6.h | 4 ++-- clients/net-snk/app/netlib/ipv6.c | 10 +++++----- clients/net-snk/app/netlib/ipv6.h | 2 +- clients/net-snk/app/netlib/ndp.c | 6 +++--- clients/net-snk/app/netlib/ndp.h | 2 +- clients/net-snk/app/netlib/tftp.h | 2 +- 16 files changed, 42 insertions(+), 47 deletions(-) diff --git a/clients/net-snk/app/netapps/Makefile b/clients/net-snk/app/netapps/Makefile index 70b990a..1e50226 100644 --- a/clients/net-snk/app/netapps/Makefile +++ b/clients/net-snk/app/netapps/Makefile @@ -16,7 +16,7 @@ ifndef TOP endif include $(TOP)/make.rules -CFLAGS += -I../ -I../../../../lib/ -Wall -W +CFLAGS += -I.. -I../netlib -I../../../../lib/ -Wall -W OBJS = netboot.o ping.o args.o diff --git a/clients/net-snk/app/netapps/netapps.h b/clients/net-snk/app/netapps/netapps.h index 20879c5..d3f7eb2 100644 --- a/clients/net-snk/app/netapps/netapps.h +++ b/clients/net-snk/app/netapps/netapps.h @@ -13,7 +13,7 @@ #ifndef _NETAPPS_H_ #define _NETAPPS_H_ -#include +#include #define F_IPV4 4 #define F_IPV6 6 diff --git a/clients/net-snk/app/netapps/netboot.c b/clients/net-snk/app/netapps/netboot.c index bb1db03..d99aa29 100644 --- a/clients/net-snk/app/netapps/netboot.c +++ b/clients/net-snk/app/netapps/netboot.c @@ -10,21 +10,21 @@ * IBM Corporation - initial implementation *****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include #include #include +#include "args.h" #include "netapps.h" #define IP_INIT_DEFAULT 5 diff --git a/clients/net-snk/app/netapps/ping.c b/clients/net-snk/app/netapps/ping.c index f55e0db..def3179 100644 --- a/clients/net-snk/app/netapps/ping.c +++ b/clients/net-snk/app/netapps/ping.c @@ -10,15 +10,15 @@ * IBM Corporation - initial implementation *****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include +#include "args.h" #include "netapps.h" struct ping_args { diff --git a/clients/net-snk/app/netlib/Makefile b/clients/net-snk/app/netlib/Makefile index df09bf8..610e189 100644 --- a/clients/net-snk/app/netlib/Makefile +++ b/clients/net-snk/app/netlib/Makefile @@ -16,7 +16,7 @@ ifndef TOP endif include $(TOP)/make.rules -CFLAGS += -I../ +CFLAGS += -I../netapps ifeq ($(SNK_USE_MTFTP), 1) CFLAGS += -DUSE_MTFTP diff --git a/clients/net-snk/app/netlib/dhcp.c b/clients/net-snk/app/netlib/dhcp.c index 7e2e88c..0cb4fa4 100644 --- a/clients/net-snk/app/netlib/dhcp.c +++ b/clients/net-snk/app/netlib/dhcp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include diff --git a/clients/net-snk/app/netlib/dhcp.h b/clients/net-snk/app/netlib/dhcp.h index 54fb1ee..4432c9b 100644 --- a/clients/net-snk/app/netlib/dhcp.h +++ b/clients/net-snk/app/netlib/dhcp.h @@ -14,12 +14,7 @@ #define _DHCP_H_ #include - -#ifdef USE_MTFTP -#include -#else -#include -#endif +#include "tftp.h" /** \struct btphdr * A header for BootP/DHCP-messages. diff --git a/clients/net-snk/app/netlib/dhcpv6.c b/clients/net-snk/app/netlib/dhcpv6.c index d0a22d5..491d540 100644 --- a/clients/net-snk/app/netlib/dhcpv6.c +++ b/clients/net-snk/app/netlib/dhcpv6.c @@ -16,12 +16,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include "ethernet.h" +#include "ipv6.h" +#include "udp.h" +#include "dhcpv6.h" +#include "tftp.h" +#include "dns.h" static uint8_t tid[3]; static uint32_t dhcpv6_state = -1; diff --git a/clients/net-snk/app/netlib/dhcpv6.h b/clients/net-snk/app/netlib/dhcpv6.h index fb77da6..02747a0 100644 --- a/clients/net-snk/app/netlib/dhcpv6.h +++ b/clients/net-snk/app/netlib/dhcpv6.h @@ -14,7 +14,7 @@ #define _DHCPV6_H_ #include -#include +#include "ethernet.h" #define DHCPV6_STATELESS 0 #define DHCPV6_STATEFUL 1 diff --git a/clients/net-snk/app/netlib/icmpv6.c b/clients/net-snk/app/netlib/icmpv6.c index 51e4a5f..e897588 100644 --- a/clients/net-snk/app/netlib/icmpv6.c +++ b/clients/net-snk/app/netlib/icmpv6.c @@ -15,11 +15,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "ethernet.h" +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" +#include "dhcpv6.h" static int ra_received = 0; diff --git a/clients/net-snk/app/netlib/icmpv6.h b/clients/net-snk/app/netlib/icmpv6.h index 3279797..41b0c70 100644 --- a/clients/net-snk/app/netlib/icmpv6.h +++ b/clients/net-snk/app/netlib/icmpv6.h @@ -14,8 +14,8 @@ #define _ICMPV6_H_ #include -#include -#include +#include "ethernet.h" +#include "ipv6.h" #define __ICMPV6_DEBUG__ diff --git a/clients/net-snk/app/netlib/ipv6.c b/clients/net-snk/app/netlib/ipv6.c index 300c913..49de5c7 100644 --- a/clients/net-snk/app/netlib/ipv6.c +++ b/clients/net-snk/app/netlib/ipv6.c @@ -17,11 +17,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "ethernet.h" +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" +#include "udp.h" #undef IPV6_DEBUG //#define IPV6_DEBUG diff --git a/clients/net-snk/app/netlib/ipv6.h b/clients/net-snk/app/netlib/ipv6.h index 6565a88..6f783b3 100644 --- a/clients/net-snk/app/netlib/ipv6.h +++ b/clients/net-snk/app/netlib/ipv6.h @@ -14,7 +14,7 @@ #define _IPV6_H_ #include -#include +#include "ethernet.h" #define __IPV6_DEBUG__ diff --git a/clients/net-snk/app/netlib/ndp.c b/clients/net-snk/app/netlib/ndp.c index 263bee2..f1f51c7 100644 --- a/clients/net-snk/app/netlib/ndp.c +++ b/clients/net-snk/app/netlib/ndp.c @@ -13,9 +13,9 @@ #include #include #include -#include -#include -#include +#include "ipv6.h" +#include "icmpv6.h" +#include "ndp.h" /* Neighbor cache */ static struct neighbor *first_neighbor; diff --git a/clients/net-snk/app/netlib/ndp.h b/clients/net-snk/app/netlib/ndp.h index 7274f10..cd18158 100644 --- a/clients/net-snk/app/netlib/ndp.h +++ b/clients/net-snk/app/netlib/ndp.h @@ -13,7 +13,7 @@ #ifndef _NDP_H_ #define _NDP_H_ -#include +#include "ipv6.h" #define __NDP_DEBUG__ diff --git a/clients/net-snk/app/netlib/tftp.h b/clients/net-snk/app/netlib/tftp.h index 1cf1266..6b5996c 100644 --- a/clients/net-snk/app/netlib/tftp.h +++ b/clients/net-snk/app/netlib/tftp.h @@ -15,7 +15,7 @@ #define _TFTP_H_ #include -#include +#include "ipv6.h" struct tftphdr { int16_t th_opcode;