diff options
| author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2009-03-04 01:53:30 -0500 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-03-04 01:53:30 -0500 |
| commit | e9cc8bddaea3944fabfebb968bc88d603239beed (patch) | |
| tree | 9d311256882e48bd133f31db564a307c2a271453 | |
| parent | 8c882f64130071eaebdc0861bee34a73e436f004 (diff) | |
netlink: Move netlink attribute parsing support to lib
Netlink attribute parsing may be used even if CONFIG_NET is not set.
Move it from net/netlink to lib and control its inclusion based on the new
config symbol CONFIG_NLATTR, which is selected by CONFIG_NET.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
| -rw-r--r-- | lib/Kconfig | 6 | ||||
| -rw-r--r-- | lib/Makefile | 2 | ||||
| -rw-r--r-- | lib/nlattr.c (renamed from net/netlink/attr.c) | 0 | ||||
| -rw-r--r-- | net/Kconfig | 1 | ||||
| -rw-r--r-- | net/netlink/Makefile | 2 |
5 files changed, 10 insertions, 1 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 03c2c24b9083..cea9e30a88ff 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
| @@ -174,4 +174,10 @@ config DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | |||
| 174 | bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS | 174 | bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS |
| 175 | depends on EXPERIMENTAL && BROKEN | 175 | depends on EXPERIMENTAL && BROKEN |
| 176 | 176 | ||
| 177 | # | ||
| 178 | # Netlink attribute parsing support is select'ed if needed | ||
| 179 | # | ||
| 180 | config NLATTR | ||
| 181 | bool | ||
| 182 | |||
| 177 | endmenu | 183 | endmenu |
diff --git a/lib/Makefile b/lib/Makefile index 32b0e64ded27..b2c09da02cae 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
| @@ -84,6 +84,8 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o | |||
| 84 | 84 | ||
| 85 | obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o | 85 | obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o |
| 86 | 86 | ||
| 87 | obj-$(CONFIG_NLATTR) += nlattr.o | ||
| 88 | |||
| 87 | hostprogs-y := gen_crc32table | 89 | hostprogs-y := gen_crc32table |
| 88 | clean-files := crc32table.h | 90 | clean-files := crc32table.h |
| 89 | 91 | ||
diff --git a/net/netlink/attr.c b/lib/nlattr.c index 56c3ce7fe29a..56c3ce7fe29a 100644 --- a/net/netlink/attr.c +++ b/lib/nlattr.c | |||
diff --git a/net/Kconfig b/net/Kconfig index cdb8fdef6c4a..eab40a481356 100644 --- a/net/Kconfig +++ b/net/Kconfig | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | menuconfig NET | 5 | menuconfig NET |
| 6 | bool "Networking support" | 6 | bool "Networking support" |
| 7 | select NLATTR | ||
| 7 | ---help--- | 8 | ---help--- |
| 8 | Unless you really know what you are doing, you should say Y here. | 9 | Unless you really know what you are doing, you should say Y here. |
| 9 | The reason is that some programs need kernel networking support even | 10 | The reason is that some programs need kernel networking support even |
diff --git a/net/netlink/Makefile b/net/netlink/Makefile index e3589c2de49e..bdd6ddf4e95b 100644 --- a/net/netlink/Makefile +++ b/net/netlink/Makefile | |||
| @@ -2,4 +2,4 @@ | |||
| 2 | # Makefile for the netlink driver. | 2 | # Makefile for the netlink driver. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := af_netlink.o attr.o genetlink.o | 5 | obj-y := af_netlink.o genetlink.o |
