VSF Documented
mount.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_SYS_MOUNT_H__
2#define __VSF_LINUX_SYS_MOUNT_H__
3
5
6// for mal
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#if VSF_LINUX_CFG_WRAPPER == ENABLED
14#define mount VSF_LINUX_WRAPPER(mount)
15#define umount VSF_LINUX_WRAPPER(umount)
16#endif
17
18// syscalls
19
20#define __NR_mount mount
21#define __NR_umount umount
22#define __NR_umount2 umount2
23
24#if VSF_USE_MAL != ENABLED
25# error VSF_USE_MAL MUST be enabled to support mount
26#endif
27
28// fsdata if filesystem is not specified
33
34#if VSF_LINUX_APPLET_USE_SYS_MOUNT == ENABLED
38# ifndef __VSF_APPLET__
40# endif
41#endif
42
43#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_MOUNT_LIB__))\
44 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_MOUNT == ENABLED
45
46#ifndef VSF_LINUX_APPLET_SYS_MOUNT_VPLT
47# if VSF_LINUX_USE_APPLET == ENABLED
48# define VSF_LINUX_APPLET_SYS_MOUNT_VPLT \
49 ((vsf_linux_sys_mount_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_mount_vplt))
50# else
51# define VSF_LINUX_APPLET_SYS_MOUNT_VPLT \
52 ((vsf_linux_sys_mount_vplt_t *)vsf_vplt((void *)0))
53# endif
54#endif
55
56#define VSF_LINUX_APPLET_SYS_MOUNT_ENTRY(__NAME) \
57 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_MOUNT_VPLT, __NAME)
58#define VSF_LINUX_APPLET_SYS_MOUNT_IMP(...) \
59 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_MOUNT_VPLT, __VA_ARGS__)
60
61#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_MOUNT
62
63// TODO: implement standard mount after device mapping is implemented
64//int mount(const char *source, const char *target,
65// const char *filesystemtype, unsigned long mountflags, const void *data);
66int mount(const char *source, const char *target,
67 const vk_fs_op_t *filesystem, unsigned long mountflags, const void *data);
68int umount(const char *target);
69int umount2(const char *target, int flags);
70
71#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_MOUNT
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif
Definition vsf_fs.h:92
mal class
Definition vsf_mal.h:154
Definition vsf_eda.h:892
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
int umount2(const char *target, int flags)
Definition vsf_linux_fs.c:2625
#define mount
Definition mount.h:14
#define umount
Definition mount.h:15
__VSF_VPLT_DECORATOR__ vsf_linux_sys_mount_vplt_t vsf_linux_sys_mount_vplt
Definition mount.h:29
vsf_mutex_t mutex
Definition mount.h:31
vk_mal_t * mal
Definition mount.h:30
Definition mount.h:35
vsf_vplt_info_t info
Definition mount.h:36
Definition vsf_cfg.h:95
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93