1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) 2019 Linaro Limited. All rights reserved. 4f08c3bdfSopenharmony_ci * Author: Sumit Garg <sumit.garg@linaro.org> 5f08c3bdfSopenharmony_ci */ 6f08c3bdfSopenharmony_ci 7f08c3bdfSopenharmony_ci#ifndef CHECK_SYNCFS_H 8f08c3bdfSopenharmony_ci#define CHECK_SYNCFS_H 9f08c3bdfSopenharmony_ci 10f08c3bdfSopenharmony_civoid check_syncfs(void) 11f08c3bdfSopenharmony_ci{ 12f08c3bdfSopenharmony_ci int ret; 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_ci ret = syncfs(-1); 15f08c3bdfSopenharmony_ci if (ret == -1 && errno == EINVAL) 16f08c3bdfSopenharmony_ci tst_brk(TCONF, "syncfs() not supported"); 17f08c3bdfSopenharmony_ci} 18f08c3bdfSopenharmony_ci 19f08c3bdfSopenharmony_ci#endif /* CHECK_SYNCFS_H */ 20