1 /* SPDX-License-Identifier: GPL-2.0-or-later 2 * Copyright (c) 2016 Cyril Hrubis <chrubis@suse.cz> 3 */ 4 5 #ifndef TST_MKFS_H__ 6 #define TST_MKFS_H__ 7 8 /* 9 * @dev: path to a device 10 * @fs_type: filesystem type 11 * @fs_opts: NULL or NULL terminated array of extra mkfs options 12 * @extra_opts: NULL or NULL terminated array of extra mkfs options which are 13 * passed after the device name. 14 */ 15 void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void), 16 const char *dev, const char *fs_type, 17 const char *const fs_opts[], const char *const extra_opts[]); 18 19 #define SAFE_MKFS(device, fs_type, fs_opts, extra_opts) \ 20 tst_mkfs_(__FILE__, __LINE__, NULL, device, fs_type, \ 21 fs_opts, extra_opts) 22 23 #endif /* TST_MKFS_H__ */ 24