generic: add fstests for idmapped mounts
[xfstests-dev.git] / src / idmapped-mounts / utils.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef __IDMAP_UTILS_H
4 #define __IDMAP_UTILS_H
5
6 #ifndef _GNU_SOURCE
7 #define _GNU_SOURCE
8 #endif
9 #include <errno.h>
10 #include <linux/types.h>
11 #include <sched.h>
12 #include <signal.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16 #include <syscall.h>
17 #include <sys/types.h>
18 #include <unistd.h>
19
20 #include "missing.h"
21
22 extern pid_t do_clone(int (*fn)(void *), void *arg, int flags);
23 extern int get_userns_fd(unsigned long nsid, unsigned long hostid,
24                          unsigned long range);
25 extern ssize_t read_nointr(int fd, void *buf, size_t count);
26 extern int wait_for_pid(pid_t pid);
27 extern ssize_t write_nointr(int fd, const void *buf, size_t count);
28
29 #endif /* __IDMAP_UTILS_H */