netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v2] net: move ifenslave from Documentation/networking to tools/networking
@ 2012-02-01  9:23 Cong Wang
  2012-02-01 19:45 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Cong Wang @ 2012-02-01  9:23 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, WANG Cong

V2: fix Documentation/networking/Makefile

ifenslave is a real tool, and it seems main distros already ship this.
It is nice to move it to tools/networking/ directory.

(Note that this patch is generated by 'git diff -C', in case of having
a large patch. It can be applied with git-apply.)

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---
 Documentation/networking/Makefile               |   11 -----------
 tools/networking/Makefile                       |   10 ++++++++++
 {Documentation => tools}/networking/ifenslave.c |    0
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile
index 24c308d..5594972 100644
--- a/Documentation/networking/Makefile
+++ b/Documentation/networking/Makefile
@@ -1,12 +1 @@
-# kbuild trick to avoid linker error. Can be omitted if a module is built.
-obj- := dummy.o
-
-# List of programs to build
-hostprogs-y := ifenslave
-
-HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
 obj-m := timestamping/
diff --git a/tools/networking/Makefile b/tools/networking/Makefile
new file mode 100644
index 0000000..7aec262
--- /dev/null
+++ b/tools/networking/Makefile
@@ -0,0 +1,10 @@
+
+CC := $(CROSS_COMPILE)gcc
+CFLAGS := -Wall -Wstrict-prototypes
+RM := rm -f
+
+all: ifenslave
+ifenslave: ifenslave.c
+	$(CC) $(CFLAGS) -o $@ $^
+clean:
+	$(RM) ifenslave
diff --git a/Documentation/networking/ifenslave.c b/tools/networking/ifenslave.c
similarity index 100%
rename from Documentation/networking/ifenslave.c
rename to tools/networking/ifenslave.c

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Patch v2] net: move ifenslave from Documentation/networking to tools/networking
  2012-02-01  9:23 [Patch v2] net: move ifenslave from Documentation/networking to tools/networking Cong Wang
@ 2012-02-01 19:45 ` David Miller
  2012-02-01 20:06 ` Jiri Pirko
  2012-02-01 20:11 ` Stephen Hemminger
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-02-01 19:45 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: netdev

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed,  1 Feb 2012 17:23:25 +0800

> V2: fix Documentation/networking/Makefile
> 
> ifenslave is a real tool, and it seems main distros already ship this.
> It is nice to move it to tools/networking/ directory.
> 
> (Note that this patch is generated by 'git diff -C', in case of having
> a large patch. It can be applied with git-apply.)
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

This is terrible.

In the existing location there is all kinds of Makefile
infrastructure, for example "hostprogs-X", to build utility programs,
yet the thing you added under tools has to do everything by hand.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch v2] net: move ifenslave from Documentation/networking to tools/networking
  2012-02-01  9:23 [Patch v2] net: move ifenslave from Documentation/networking to tools/networking Cong Wang
  2012-02-01 19:45 ` David Miller
@ 2012-02-01 20:06 ` Jiri Pirko
  2012-02-01 20:11 ` Stephen Hemminger
  2 siblings, 0 replies; 5+ messages in thread
From: Jiri Pirko @ 2012-02-01 20:06 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, David S. Miller

How about to just let ifenslave rot on the place it is?

Wed, Feb 01, 2012 at 10:23:25AM CET, xiyou.wangcong@gmail.com wrote:
>V2: fix Documentation/networking/Makefile
>
>ifenslave is a real tool, and it seems main distros already ship this.
>It is nice to move it to tools/networking/ directory.
>
>(Note that this patch is generated by 'git diff -C', in case of having
>a large patch. It can be applied with git-apply.)
>
>Cc: "David S. Miller" <davem@davemloft.net>
>Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>
>---
> Documentation/networking/Makefile               |   11 -----------
> tools/networking/Makefile                       |   10 ++++++++++
> {Documentation => tools}/networking/ifenslave.c |    0
> 3 files changed, 10 insertions(+), 11 deletions(-)
>
>diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile
>index 24c308d..5594972 100644
>--- a/Documentation/networking/Makefile
>+++ b/Documentation/networking/Makefile
>@@ -1,12 +1 @@
>-# kbuild trick to avoid linker error. Can be omitted if a module is built.
>-obj- := dummy.o
>-
>-# List of programs to build
>-hostprogs-y := ifenslave
>-
>-HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
>-
>-# Tell kbuild to always build the programs
>-always := $(hostprogs-y)
>-
> obj-m := timestamping/
>diff --git a/tools/networking/Makefile b/tools/networking/Makefile
>new file mode 100644
>index 0000000..7aec262
>--- /dev/null
>+++ b/tools/networking/Makefile
>@@ -0,0 +1,10 @@
>+
>+CC := $(CROSS_COMPILE)gcc
>+CFLAGS := -Wall -Wstrict-prototypes
>+RM := rm -f
>+
>+all: ifenslave
>+ifenslave: ifenslave.c
>+	$(CC) $(CFLAGS) -o $@ $^
>+clean:
>+	$(RM) ifenslave
>diff --git a/Documentation/networking/ifenslave.c b/tools/networking/ifenslave.c
>similarity index 100%
>rename from Documentation/networking/ifenslave.c
>rename to tools/networking/ifenslave.c
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch v2] net: move ifenslave from Documentation/networking to tools/networking
  2012-02-01  9:23 [Patch v2] net: move ifenslave from Documentation/networking to tools/networking Cong Wang
  2012-02-01 19:45 ` David Miller
  2012-02-01 20:06 ` Jiri Pirko
@ 2012-02-01 20:11 ` Stephen Hemminger
  2012-02-02  9:38   ` Cong Wang
  2 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2012-02-01 20:11 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, David S. Miller

On Wed,  1 Feb 2012 17:23:25 +0800
Cong Wang <xiyou.wangcong@gmail.com> wrote:

> V2: fix Documentation/networking/Makefile
> 
> ifenslave is a real tool, and it seems main distros already ship this.
> It is nice to move it to tools/networking/ directory.
> 
> (Note that this patch is generated by 'git diff -C', in case of having
> a large patch. It can be applied with git-apply.)
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

ifenslave is considered deprecated in favor of using ip link command

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch v2] net: move ifenslave from Documentation/networking to tools/networking
  2012-02-01 20:11 ` Stephen Hemminger
@ 2012-02-02  9:38   ` Cong Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Cong Wang @ 2012-02-02  9:38 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, David S. Miller

On 02/02/2012 04:11 AM, Stephen Hemminger wrote:
> On Wed,  1 Feb 2012 17:23:25 +0800
> Cong Wang<xiyou.wangcong@gmail.com>  wrote:
>
>> V2: fix Documentation/networking/Makefile
>>
>> ifenslave is a real tool, and it seems main distros already ship this.
>> It is nice to move it to tools/networking/ directory.
>>
>> (Note that this patch is generated by 'git diff -C', in case of having
>> a large patch. It can be applied with git-apply.)
>>
>> Cc: "David S. Miller"<davem@davemloft.net>
>> Signed-off-by: WANG Cong<xiyou.wangcong@gmail.com>
>
> ifenslave is considered deprecated in favor of using ip link command

Ok, then I think it is better to leave as it is.

Thanks for all replies!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-02  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01  9:23 [Patch v2] net: move ifenslave from Documentation/networking to tools/networking Cong Wang
2012-02-01 19:45 ` David Miller
2012-02-01 20:06 ` Jiri Pirko
2012-02-01 20:11 ` Stephen Hemminger
2012-02-02  9:38   ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).