[CRIU] [PATCH 5/6] test/zdtm: rm get_smaps_bits proto from zdtmtst.h

Kir Kolyshkin kir at openvz.org
Tue May 2 16:51:46 PDT 2017


The function is not included into the library, so having its prototype
there was a shortcut. Move it to a separate include file.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 test/zdtm/lib/zdtmtst.h           | 1 -
 test/zdtm/static/get_smaps_bits.h | 6 ++++++
 test/zdtm/static/maps02.c         | 1 +
 test/zdtm/static/mlock_setuid.c   | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 test/zdtm/static/get_smaps_bits.h

diff --git a/test/zdtm/lib/zdtmtst.h b/test/zdtm/lib/zdtmtst.h
index 3f9f550..de01cc2 100644
--- a/test/zdtm/lib/zdtmtst.h
+++ b/test/zdtm/lib/zdtmtst.h
@@ -141,5 +141,4 @@ extern int tcp_init_server(int family, int *port);
 extern int tcp_accept_server(int sock);
 extern int tcp_init_client(int family, char *servIP, unsigned short servPort);
 
-extern int get_smaps_bits(unsigned long where, unsigned long *flags, unsigned long *madv);
 #endif /* _VIMITESU_H_ */
diff --git a/test/zdtm/static/get_smaps_bits.h b/test/zdtm/static/get_smaps_bits.h
new file mode 100644
index 0000000..ce1070d
--- /dev/null
+++ b/test/zdtm/static/get_smaps_bits.h
@@ -0,0 +1,6 @@
+#ifndef ZDTM_GET_SMAPS_BITS_H_
+#define ZDTM_GET_SMAPS_BITS_H_
+
+extern int get_smaps_bits(unsigned long where, unsigned long *flags, unsigned long *madv);
+
+#endif /* ZDTM_GET_SMAPS_BITS_H_ */
diff --git a/test/zdtm/static/maps02.c b/test/zdtm/static/maps02.c
index 5713235..eb7c09b 100644
--- a/test/zdtm/static/maps02.c
+++ b/test/zdtm/static/maps02.c
@@ -1,5 +1,6 @@
 #include <sys/mman.h>
 #include "zdtmtst.h"
+#include "get_smaps_bits.h"
 
 #ifndef MADV_DONTDUMP
 #define MADV_DONTDUMP   16
diff --git a/test/zdtm/static/mlock_setuid.c b/test/zdtm/static/mlock_setuid.c
index a6847a6..a737bdd 100644
--- a/test/zdtm/static/mlock_setuid.c
+++ b/test/zdtm/static/mlock_setuid.c
@@ -2,6 +2,7 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include "zdtmtst.h"
+#include "get_smaps_bits.h"
 
 #define MEM_SIZE (69632)
 
-- 
2.9.3



More information about the CRIU mailing list