]> granicus.if.org Git - strace/commitdiff
Move nl_route_types definition from netlink.c to netlink_route.c
authorJingPiao Chen <chenjingpiao@gmail.com>
Fri, 16 Jun 2017 12:58:38 +0000 (20:58 +0800)
committerJingPiao Chen <chenjingpiao@gmail.com>
Wed, 9 Aug 2017 00:43:49 +0000 (08:43 +0800)
The side effect of #include "xlat/nl_route_types.h" is
RTM_* constants properly defined in that header file.
While netlink.c does not use these constants itself,
netlink_route.c is going to need them soon.

* defs.h (nl_route_types): New xlat prototype.
* netlink.c: Move inclusion of "xlat/nl_route_types.h" ...
* netlink_route.c: ... here.

defs.h
netlink.c
netlink_route.c

diff --git a/defs.h b/defs.h
index 44a6296e9bcc6f5c6f3442d9fcdcce4afbdb40b5..5b09f2e3cbc744494fa5bfad5384587a21b30e5f 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -292,6 +292,7 @@ extern const struct xlat evdev_abs[];
 extern const struct xlat inet_protocols[];
 extern const struct xlat msg_flags[];
 extern const struct xlat netlink_protocols[];
+extern const struct xlat nl_route_types[];
 extern const struct xlat open_access_modes[];
 extern const struct xlat open_mode_flags[];
 extern const struct xlat resource_flags[];
index 2a0353fdc118d73de9c2528f68b2d276523c70c9..ab40b1420c4b42e70e5a9460c85a81e5ee0f716c 100644 (file)
--- a/netlink.c
+++ b/netlink.c
@@ -43,7 +43,6 @@
 #include "xlat/nl_crypto_types.h"
 #include "xlat/nl_netfilter_msg_types.h"
 #include "xlat/nl_netfilter_subsys_ids.h"
-#include "xlat/nl_route_types.h"
 #include "xlat/nl_selinux_types.h"
 #include "xlat/nl_sock_diag_types.h"
 #include "xlat/nl_xfrm_types.h"
index 2e7faa4c60c9c2c32bab1cee192784218787a60e..dc5a13f4b8363d84370725c1c454ac73da6d2fa3 100644 (file)
@@ -30,6 +30,8 @@
 #include "defs.h"
 #include "netlink.h"
 
+#include "xlat/nl_route_types.h"
+
 static void
 decode_family(struct tcb *const tcp, const uint8_t family,
              const kernel_ulong_t addr, const unsigned int len)