Debian Codegraph @

tools/include/nolibc/sys/mount.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
2 /*
3 * Mount definitions for NOLIBC
4 * Copyright (C) 2017-2021 Willy Tarreau <[email protected]>
5 */
6
7 /* make sure to include all global symbols */
8 #include "../nolibc.h"
9
10 #ifndef _NOLIBC_SYS_MOUNT_H
11 #define _NOLIBC_SYS_MOUNT_H
12
13 #include "../sys.h"
14
15 #include <linux/mount.h>
16
17 /*
18 * int mount(const char *source, const char *target,
19 * const char *fstype, unsigned long flags,
20 * const void *data);
21 */
22 static __attribute__((unused))
23 int sys_mount(const char *src, const char *tgt, const char *fst,
24 unsigned long flags, const void *data)
25 {
26 return my_syscall5(__NR_mount, src, tgt, fst, flags, data);
27 }
28
29 static __attribute__((unused))
30 int mount(const char *src, const char *tgt,
31 const char *fst, unsigned long flags,
32 const void *data)
33 {
34 return __sysret(sys_mount(src, tgt, fst, flags, data));
35 }
36
37 #endif /* _NOLIBC_SYS_MOUNT_H */