#ifdef UL_HAVE_MOUNT_API
+#define get_sysapi(_cxt) mnt_context_get_sysapi(_cxt)
+
#define set_syscall_status(_cxt, _name, _x) __extension__ ({ \
if (!(_x)) { \
DBG(HOOK, ul_debug("syscall '%s' [%m]", _name)); \
return 0;
}
-static inline struct libmnt_sysapi *get_sysapi(struct libmnt_context *cxt,
- const struct libmnt_hookset *hs)
-{
- return mnt_context_get_hookset_data(cxt, hs);
-}
static int configure_superblock(struct libmnt_context *cxt,
const struct libmnt_hookset *hs, int fd)
assert(cxt);
assert(cxt->fs);
- api = get_sysapi(cxt, hs);
+ api = get_sysapi(cxt);
assert(api);
if (api->fd_fs < 0) {
assert(cxt);
- api = get_sysapi(cxt, hs);
+ api = get_sysapi(cxt);
assert(api);
assert(api->fd_tree >= 0);
DBG(HOOK, ul_debugobj(hs, "setting VFS flags"));
- api = get_sysapi(cxt, hs);
+ api = get_sysapi(cxt);
assert(api);
/* fallback only; necessary when init_sysapi() during preparation
if (!ol)
return -ENOMEM;
- api = get_sysapi(cxt, hs);
+ api = get_sysapi(cxt);
assert(api);
/* fallback only; necessary when init_sysapi() during preparation
if (!target)
return -EINVAL;
- api = get_sysapi(cxt, hs);
+ api = get_sysapi(cxt);
assert(api);
assert(api->fd_tree >= 0);
int fd_fs; /* FD from fsopen() or fspick() */
int fd_tree; /* FD from fsmount() or open_tree() */
};
+
+static inline struct libmnt_sysapi *mnt_context_get_sysapi(struct libmnt_context *cxt)
+{
+ return mnt_context_get_hookset_data(cxt, &hookset_mount);
+}
#endif
#endif /* _LIBMOUNT_PRIVATE_H */