xref: /aosp_15_r20/external/ltp/testcases/kernel/syscalls/syncfs/check_syncfs.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2019 Linaro Limited. All rights reserved.
4  * Author: Sumit Garg <[email protected]>
5  */
6 
7 #ifndef CHECK_SYNCFS_H
8 #define CHECK_SYNCFS_H
9 
check_syncfs(void)10 void check_syncfs(void)
11 {
12 	int ret;
13 
14 	ret = syncfs(-1);
15 	if (ret == -1 && errno == EINVAL)
16 		tst_brk(TCONF, "syncfs() not supported");
17 }
18 
19 #endif /* CHECK_SYNCFS_H */
20