]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
iface: dissolve module name/revision macros
authorJan Engelhardt <jengelh@medozas.de>
Sun, 26 Apr 2009 20:07:43 +0000 (22:07 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 26 Apr 2009 20:07:43 +0000 (22:07 +0200)
The module name will unlikely be changing anytime soon. And if the
revision increases, we cannot just bump the number (well, in
Xtables-addons we can, but it would not be the case for the core
kernel). So let's not get into bad habits.

extensions/libxt_iface.c
extensions/xt_iface.c
extensions/xt_iface.h

index 8b162dfbc625aca5075e8e04f40d0d8bb9f5002a..d5631de77a189f47fe68e3df5f0d5eb675c9e623 100644 (file)
@@ -68,7 +68,7 @@ static bool iface_valid_name(const char *name)
 static void iface_mt_help(void)
 {
        printf(
-       _MODULE_NAME " match options:\n"
+       "iface match options:\n"
        "    --iface interface\t\tName of interface\n"
        "[!] --up\n"
        "[!] --down\t\t\tmatch if UP flag (not) set\n"
@@ -203,8 +203,8 @@ static void iface_mt_save(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match iface_mt_reg = {
        .version        = XTABLES_VERSION,
-       .name           = _MODULE_NAME,
-       .revision       = _MODULE_REVISION,
+       .name           = "iface",
+       .revision       = 0,
        .family         = AF_INET,
        .size           = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
@@ -218,8 +218,8 @@ static struct xtables_match iface_mt_reg = {
 
 static struct xtables_match iface_mt6_reg = {
        .version        = XTABLES_VERSION,
-       .name           = _MODULE_NAME,
-       .revision       = _MODULE_REVISION,
+       .name           = "iface",
+       .revision       = 0,
        .family         = AF_INET6,
        .size           = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
index 2d633cd725bd916382bff64a63b10841d4a365ec..bfcbfc59cfb0aa5068895e3657d98e6e43b93c71 100644 (file)
@@ -58,8 +58,8 @@ static bool xt_iface_mt(const struct sk_buff *skb,
 
 static struct xt_match xt_iface_mt_reg[] __read_mostly = {
        {
-               .name       = _MODULE_NAME,
-               .revision   = _MODULE_REVISION,
+               .name       = "iface",
+               .revision   = 0,
                .family     = NFPROTO_IPV4,
                .matchsize  = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
                .match      = xt_iface_mt,
@@ -67,8 +67,8 @@ static struct xt_match xt_iface_mt_reg[] __read_mostly = {
                .me         = THIS_MODULE,
        },
        {
-               .name       = _MODULE_NAME,
-               .revision   = _MODULE_REVISION,
+               .name       = "iface",
+               .revision   = 0,
                .family     = NFPROTO_IPV6,
                .matchsize  = XT_ALIGN(sizeof(struct xt_iface_mtinfo)),
                .match      = xt_iface_mt,
index 97ac4ebcf58691c114718aac35772dfb0e577374..0a460d9080a229be68e163efff39f8d1cd739c55 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _LINUX_NETFILTER_XT_IFACE_H
 #define _LINUX_NETFILTER_XT_IFACE_H 1
 
-#define _MODULE_NAME "iface"
-#define _MODULE_REVISION 0
-
 #define XT_IFACE_FLAGCOUNT 11
 
 enum {