@@ -64,6 +64,7 @@
#include "old_tmpdir.h"
#include "tst_minmax.h"
#include "tst_get_bad_addr.h"
+#include "tst_path_has_mnt_flags.h"
/*
* Ensure that NUMSIGS is defined.
@@ -236,18 +237,6 @@ unsigned short tst_get_unused_port(void (cleanup_fn)(void),
const char *tst_strsig(int sig);
const char *tst_strerrno(int err);
-/* lib/tst_path_has_mnt_flags.c
- *
- * Check whether a path is on a filesystem that is mounted with
- * specified flags
- * @path: path to file, if path is NULL tst_tmpdir is used.
- * @flags: NULL or NULL terminated array of mount flags
- *
- * Return: 0..n - number of flags matched
- */
-int tst_path_has_mnt_flags(void (cleanup_fn)(void),
- const char *path, const char *flags[]);
-
#ifdef TST_USE_COMPAT16_SYSCALL
#define TCID_BIT_SUFFIX "_16"
#elif TST_USE_NEWER64_SYSCALL
new file mode 100644
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
+ * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+ */
+
+#ifndef TST_PATH_HAS_MNT_FLAGS_H__
+#define TST_PATH_HAS_MNT_FLAGS_H__
+
+/* lib/tst_path_has_mnt_flags.c
+ *
+ * Check whether a path is on a filesystem that is mounted with
+ * specified flags
+ * @path: path to file, if path is NULL tst_tmpdir is used.
+ * @flags: NULL or NULL terminated array of mount flags
+ *
+ * Return: 0..n - number of flags matched
+ */
+int tst_path_has_mnt_flags(void (*cleanup_fn)(void),
+ const char *path, const char *flags[]);
+
+#endif /* TST_PATH_HAS_MNT_FLAGS_H__ */
@@ -41,6 +41,7 @@
#include "tst_kernel.h"
#include "tst_minmax.h"
#include "tst_get_bad_addr.h"
+#include "tst_path_has_mnt_flags.h"
/*
* Reports testcase result.
We can use existed tst_path_has_mnt_flags() to check whether a path is on a filesystem that is mounted with specified flags, so ensure that the function can also be used by new API. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- include/old/test.h | 13 +------------ include/tst_path_has_mnt_flags.h | 22 ++++++++++++++++++++++ include/tst_test.h | 1 + 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 include/tst_path_has_mnt_flags.h