• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
4  * Copyright (c) 2018 Cyril Hrubis <chrubis@suse.cz>
5  * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
6  */
7 
8 #ifndef TST_PATH_HAS_MNT_FLAGS_H__
9 #define TST_PATH_HAS_MNT_FLAGS_H__
10 
11 #ifdef TST_TEST_H__
12 # define tst_path_has_mnt_flags(...) tst_path_has_mnt_flags_(NULL, __VA_ARGS__)
13 #else
14 # define tst_path_has_mnt_flags tst_path_has_mnt_flags_
15 #endif
16 
17 /* lib/tst_path_has_mnt_flags.c
18  *
19  * Check whether a path is on a filesystem that is mounted with
20  * specified flags
21  * @path: path to file, if path is NULL tst_tmpdir is used.
22  * @flags: NULL or NULL terminated array of mount flags
23  *
24  * Return: 0..n - number of flags matched
25  */
26 int tst_path_has_mnt_flags_(void (*cleanup_fn)(void),
27 		const char *path, const char *flags[]);
28 
29 #endif	/* TST_PATH_HAS_MNT_FLAGS_H__ */
30