diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-08-10 18:37:12 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-08-10 18:37:12 +0200 |
| commit | fce5aa5a6b328d1cced084bf919a70bb60c6f89f (patch) | |
| tree | 72735a5b92e800b250f131d671b2638605211eed /src | |
| parent | 2ac2996abd54cdb36624738b7ca30a9abc93a78a (diff) | |
| download | box64-fce5aa5a6b328d1cced084bf919a70bb60c6f89f.tar.gz box64-fce5aa5a6b328d1cced084bf919a70bb60c6f89f.zip | |
Added disabled wrapped libfuse (not working for now)
Diffstat (limited to 'src')
| -rwxr-xr-x | src/include/myalign.h | 1 | ||||
| -rwxr-xr-x | src/library_list.h | 1 | ||||
| -rwxr-xr-x | src/libtools/myalign.c | 20 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 6 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibfusedefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibfusetypes.h | 21 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibfuseundefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibfuse.c | 956 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibfuse_private.h | 179 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibx11_private.h | 2 |
12 files changed, 1204 insertions, 1 deletions
diff --git a/src/include/myalign.h b/src/include/myalign.h index 29550942..17ab57fa 100755 --- a/src/include/myalign.h +++ b/src/include/myalign.h @@ -137,6 +137,7 @@ struct x64_stat64 { /* x86_64 arm64 */ uint64_t __glibc_reserved[3]; /* 120 */ /* 120 */ } __attribute__((packed)); /* 144 */ /* 128 */ +void AlignStat64(const void* source, void* dest); void UnalignStat64(const void* source, void* dest); // defined in wrapperlibc.c diff --git a/src/library_list.h b/src/library_list.h index 99d76d71..aea30deb 100755 --- a/src/library_list.h +++ b/src/library_list.h @@ -160,6 +160,7 @@ GO("libxml2.so.2", xml2) GO("libkrb5.so.3", krb5) GO("libgssapi_krb5.so.2", gssapikrb5) //GO("libtiff.so.5", libtiff) +//GO("libfuse.so.2", libfuse) GO("ld-linux-x86-64.so.2", ldlinux) diff --git a/src/libtools/myalign.c b/src/libtools/myalign.c index 82d57361..181242f3 100755 --- a/src/libtools/myalign.c +++ b/src/libtools/myalign.c @@ -710,6 +710,26 @@ void UnalignStat64(const void* source, void* dest) x64st->st_ctim = st->st_ctim; } +void AlignStat64(const void* source, void* dest) +{ + struct stat *st = (struct stat*) dest; + struct x64_stat64 *x64st = (struct x64_stat64*)source; + + st->st_dev = x64st->st_dev; + st->st_ino = x64st->st_ino; + st->st_mode = x64st->st_mode; + st->st_nlink = x64st->st_nlink; + st->st_uid = x64st->st_uid; + st->st_gid = x64st->st_gid; + st->st_rdev = x64st->st_rdev; + st->st_size = x64st->st_size; + st->st_blksize = x64st->st_blksize; + st->st_blocks = x64st->st_blocks; + st->st_atim = x64st->st_atim; + st->st_mtim = x64st->st_mtim; + st->st_ctim = x64st->st_ctim; +} + typedef union __attribute__((packed)) x64_epoll_data { void *ptr; int fd; diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 308fd4eb..3ec85777 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -932,6 +932,7 @@ #() pFEpupp #() pFEppii #() pFEppip +#() pFEppLp #() pFEpppi #() pFEpppu #() pFEpppp @@ -1850,6 +1851,11 @@ wrappedlibdl: - dlvsym wrappedlibform: wrappedlibformw: +wrappedlibfuse: +- iFpppp: + - fuse_opt_parse +- pFppLp: + - fuse_lowlevel_new wrappedlibgl: - iFi: - glXSwapIntervalMESA diff --git a/src/wrapped/generated/wrappedlibfusedefs.h b/src/wrapped/generated/wrappedlibfusedefs.h new file mode 100644 index 00000000..4084b95d --- /dev/null +++ b/src/wrapped/generated/wrappedlibfusedefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibfuseDEFS_H_ +#define __wrappedlibfuseDEFS_H_ + + +#endif // __wrappedlibfuseDEFS_H_ diff --git a/src/wrapped/generated/wrappedlibfusetypes.h b/src/wrapped/generated/wrappedlibfusetypes.h new file mode 100644 index 00000000..9ecc9c18 --- /dev/null +++ b/src/wrapped/generated/wrappedlibfusetypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibfuseTYPES_H_ +#define __wrappedlibfuseTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); +typedef void* (*pFppLp_t)(void*, void*, uintptr_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(fuse_opt_parse, iFpppp_t) \ + GO(fuse_lowlevel_new, pFppLp_t) + +#endif // __wrappedlibfuseTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibfuseundefs.h b/src/wrapped/generated/wrappedlibfuseundefs.h new file mode 100644 index 00000000..1234d96f --- /dev/null +++ b/src/wrapped/generated/wrappedlibfuseundefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * + *******************************************************************/ +#ifndef __wrappedlibfuseUNDEFS_H_ +#define __wrappedlibfuseUNDEFS_H_ + + +#endif // __wrappedlibfuseUNDEFS_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 1e31fd6d..9a903227 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -966,6 +966,7 @@ typedef void* (*pFEpipp_t)(x64emu_t*, void*, int64_t, void*, void*); typedef void* (*pFEpupp_t)(x64emu_t*, void*, uint64_t, void*, void*); typedef void* (*pFEppii_t)(x64emu_t*, void*, void*, int64_t, int64_t); typedef void* (*pFEppip_t)(x64emu_t*, void*, void*, int64_t, void*); +typedef void* (*pFEppLp_t)(x64emu_t*, void*, void*, uintptr_t, void*); typedef void* (*pFEpppi_t)(x64emu_t*, void*, void*, void*, int64_t); typedef void* (*pFEpppu_t)(x64emu_t*, void*, void*, void*, uint64_t); typedef void* (*pFEpppp_t)(x64emu_t*, void*, void*, void*, void*); @@ -2491,6 +2492,7 @@ void pFEpipp(x64emu_t *emu, uintptr_t fcn) { pFEpipp_t fn = (pFEpipp_t)fcn; R_RA void pFEpupp(x64emu_t *emu, uintptr_t fcn) { pFEpupp_t fn = (pFEpupp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } void pFEppii(x64emu_t *emu, uintptr_t fcn) { pFEppii_t fn = (pFEppii_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void pFEppip(x64emu_t *emu, uintptr_t fcn) { pFEppip_t fn = (pFEppip_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } +void pFEppLp(x64emu_t *emu, uintptr_t fcn) { pFEppLp_t fn = (pFEppLp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); } void pFEpppi(x64emu_t *emu, uintptr_t fcn) { pFEpppi_t fn = (pFEpppi_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX); } void pFEpppu(x64emu_t *emu, uintptr_t fcn) { pFEpppu_t fn = (pFEpppu_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX); } void pFEpppp(x64emu_t *emu, uintptr_t fcn) { pFEpppp_t fn = (pFEpppp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 3d65511c..f77fa105 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -965,6 +965,7 @@ void pFEpipp(x64emu_t *emu, uintptr_t fnc); void pFEpupp(x64emu_t *emu, uintptr_t fnc); void pFEppii(x64emu_t *emu, uintptr_t fnc); void pFEppip(x64emu_t *emu, uintptr_t fnc); +void pFEppLp(x64emu_t *emu, uintptr_t fnc); void pFEpppi(x64emu_t *emu, uintptr_t fnc); void pFEpppu(x64emu_t *emu, uintptr_t fnc); void pFEpppp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibfuse.c b/src/wrapped/wrappedlibfuse.c new file mode 100755 index 00000000..c87559e4 --- /dev/null +++ b/src/wrapped/wrappedlibfuse.c @@ -0,0 +1,956 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> +#include <sys/stat.h> + +#include "wrappedlibs.h" + +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" +#include "callback.h" +#include "myalign.h" +#include "debug.h" + +static library_t *my_lib = NULL; +const char* libfuseName = "libfuse.so.2"; +#define LIBNAME libfuse + +#include "generated/wrappedlibfusetypes.h" + +typedef struct fuse_lowlevel_ops_s { + void (*init) (void *userdata, void *conn); + void (*destroy) (void *userdata); + void (*lookup) (void* req, unsigned long parent, const char *name); + void (*forget) (void* req, unsigned long ino, unsigned long nlookup); + void (*getattr) (void* req, unsigned long ino, void *fi); + void (*setattr) (void* req, unsigned long ino, struct stat *attr, int to_set, void *fi); + void (*readlink) (void* req, unsigned long ino); + void (*mknod) (void* req, unsigned long parent, const char *name, mode_t mode, dev_t rdev); + void (*mkdir) (void* req, unsigned long parent, const char *name, mode_t mode); + void (*unlink) (void* req, unsigned long parent, const char *name); + void (*rmdir) (void* req, unsigned long parent, const char *name); + void (*symlink) (void* req, const char *link, unsigned long parent, const char *name); + void (*rename) (void* req, unsigned long parent, const char *name, unsigned long newparent, const char *newname); + void (*link) (void* req, unsigned long ino, unsigned long newparent, const char *newname); + void (*open) (void* req, unsigned long ino, void *fi); + void (*read) (void* req, unsigned long ino, size_t size, off_t off, void *fi); + void (*write) (void* req, unsigned long ino, const char *buf, size_t size, off_t off, void *fi); + void (*flush) (void* req, unsigned long ino, void *fi); + void (*release) (void* req, unsigned long ino, void *fi); + void (*fsync) (void* req, unsigned long ino, int datasync, void *fi); + void (*opendir) (void* req, unsigned long ino, void *fi); + void (*readdir) (void* req, unsigned long ino, size_t size, off_t off, void *fi); + void (*releasedir) (void* req, unsigned long ino, void *fi); + void (*fsyncdir) (void* req, unsigned long ino, int datasync, void *fi); + void (*statfs) (void* req, unsigned long ino); + void (*setxattr) (void* req, unsigned long ino, const char *name, const char *value, size_t size, int flags); + void (*getxattr) (void* req, unsigned long ino, const char *name, size_t size); + void (*listxattr) (void* req, unsigned long ino, size_t size); + void (*removexattr) (void* req, unsigned long ino, const char *name); + void (*access) (void* req, unsigned long ino, int mask); + void (*create) (void* req, unsigned long parent, const char *name, mode_t mode, void *fi); + void (*getlk) (void* req, unsigned long ino, void *fi, void *lock); + void (*setlk) (void* req, unsigned long ino, void *fi, void *lock, int sleep); + void (*bmap) (void* req, unsigned long ino, size_t blocksize, uint64_t idx); +} fuse_lowlevel_ops_t; + +typedef struct libfuse_my_s { + // functions + #define GO(A, B) B A; + SUPER() + #undef GO +} libfuse_my_t; + +void* getFuseMy(library_t* lib) +{ + my_lib = lib; + libfuse_my_t* my = (libfuse_my_t*)calloc(1, sizeof(libfuse_my_t)); + #define GO(A, W) my->A = (W)dlsym(lib->priv.w.lib, #A); + SUPER() + #undef GO + return my; +} + +void freeFuseMy(void* lib) +{ + (void)lib; + //libfuse_my_t *my = (libfuse_my_t *)lib; +} +#undef SUPER + +#define SUPER() \ +GO(0) \ +GO(1) \ +GO(2) \ +GO(3) + +// fuse_opt_proc +#define GO(A) \ +static uintptr_t my_fuse_opt_proc_fct_##A = 0; \ +static int my_fuse_opt_proc_##A(void* a, void* b, int c, void* d) \ +{ \ + return RunFunction(my_context, my_fuse_opt_proc_fct_##A, 4, a, b, c, d);\ +} +SUPER() +#undef GO +static void* findfuse_opt_procFct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_fuse_opt_proc_fct_##A == (uintptr_t)fct) return my_fuse_opt_proc_##A; + SUPER() + #undef GO + #define GO(A) if(my_fuse_opt_proc_fct_##A == 0) {my_fuse_opt_proc_fct_##A = (uintptr_t)fct; return my_fuse_opt_proc_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse fuse_opt_proc callback\n"); + return NULL; +} + +// init +#define GO(A) \ +static uintptr_t my_init_fct_##A = 0; \ +static void my_init_##A(void* a, void* b) \ +{ \ + RunFunction(my_context, my_init_fct_##A, 2, a, b);\ +} +SUPER() +#undef GO +static void* find_init_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_init_fct_##A == (uintptr_t)fct) return my_init_##A; + SUPER() + #undef GO + #define GO(A) if(my_init_fct_##A == 0) {my_init_fct_##A = (uintptr_t)fct; return my_init_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse init callback\n"); + return NULL; +} + +// destroy +#define GO(A) \ +static uintptr_t my_destroy_fct_##A = 0; \ +static void my_destroy_##A(void* a) \ +{ \ + RunFunction(my_context, my_destroy_fct_##A, 1, a); \ +} +SUPER() +#undef GO +static void* find_destroy_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_destroy_fct_##A == (uintptr_t)fct) return my_destroy_##A; + SUPER() + #undef GO + #define GO(A) if(my_destroy_fct_##A == 0) {my_destroy_fct_##A = (uintptr_t)fct; return my_destroy_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse destroy callback\n"); + return NULL; +} + +// lookup +#define GO(A) \ +static uintptr_t my_lookup_fct_##A = 0; \ +static void my_lookup_##A(void* a, unsigned long b, void* c)\ +{ \ + RunFunction(my_context, my_lookup_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_lookup_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_lookup_fct_##A == (uintptr_t)fct) return my_lookup_##A; + SUPER() + #undef GO + #define GO(A) if(my_lookup_fct_##A == 0) {my_lookup_fct_##A = (uintptr_t)fct; return my_lookup_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse lookup callback\n"); + return NULL; +} + +// forget +#define GO(A) \ +static uintptr_t my_forget_fct_##A = 0; \ +static void my_forget_##A(void* a, unsigned long b, unsigned long c)\ +{ \ + RunFunction(my_context, my_forget_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_forget_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_forget_fct_##A == (uintptr_t)fct) return my_forget_##A; + SUPER() + #undef GO + #define GO(A) if(my_forget_fct_##A == 0) {my_forget_fct_##A = (uintptr_t)fct; return my_forget_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse forget callback\n"); + return NULL; +} + +// getattr +#define GO(A) \ +static uintptr_t my_getattr_fct_##A = 0; \ +static void my_getattr_##A(void* a, unsigned long b, void* c) \ +{ \ + RunFunction(my_context, my_getattr_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_getattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_getattr_fct_##A == (uintptr_t)fct) return my_getattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_getattr_fct_##A == 0) {my_getattr_fct_##A = (uintptr_t)fct; return my_getattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse getattr callback\n"); + return NULL; +} + +// setattr +#define GO(A) \ +static uintptr_t my_setattr_fct_##A = 0; \ +static void my_setattr_##A(void* a, unsigned long b, struct stat* c, int d, void* e) \ +{ \ + struct stat c_; \ + AlignStat64(c, &c_); \ + RunFunction(my_context, my_setattr_fct_##A, 5, a, b, &c_, d, e); \ +} +SUPER() +#undef GO +static void* find_setattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_setattr_fct_##A == (uintptr_t)fct) return my_setattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_setattr_fct_##A == 0) {my_setattr_fct_##A = (uintptr_t)fct; return my_setattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse setattr callback\n"); + return NULL; +} + +// readlink +#define GO(A) \ +static uintptr_t my_readlink_fct_##A = 0; \ +static void my_readlink_##A(void* a, unsigned long b) \ +{ \ + RunFunction(my_context, my_readlink_fct_##A, 2, a, b); \ +} +SUPER() +#undef GO +static void* find_readlink_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_readlink_fct_##A == (uintptr_t)fct) return my_readlink_##A; + SUPER() + #undef GO + #define GO(A) if(my_readlink_fct_##A == 0) {my_readlink_fct_##A = (uintptr_t)fct; return my_readlink_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse readlink callback\n"); + return NULL; +} + +// mknod +#define GO(A) \ +static uintptr_t my_mknod_fct_##A = 0; \ +static void my_mknod_##A(void* a, unsigned long b, const char* c, mode_t d, dev_t e) \ +{ \ + RunFunction(my_context, my_mknod_fct_##A, 5, a, b, c, of_convert(d), e); \ +} +SUPER() +#undef GO +static void* find_mknod_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_mknod_fct_##A == (uintptr_t)fct) return my_mknod_##A; + SUPER() + #undef GO + #define GO(A) if(my_mknod_fct_##A == 0) {my_mknod_fct_##A = (uintptr_t)fct; return my_mknod_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse mknod callback\n"); + return NULL; +} + +// mkdir +#define GO(A) \ +static uintptr_t my_mkdir_fct_##A = 0; \ +static void my_mkdir_##A(void* a, unsigned long b, const char* c, mode_t d) \ +{ \ + RunFunction(my_context, my_mkdir_fct_##A, 4, a, b, c, of_convert(d)); \ +} +SUPER() +#undef GO +static void* find_mkdir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_mkdir_fct_##A == (uintptr_t)fct) return my_mkdir_##A; + SUPER() + #undef GO + #define GO(A) if(my_mkdir_fct_##A == 0) {my_mkdir_fct_##A = (uintptr_t)fct; return my_mkdir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse mkdir callback\n"); + return NULL; +} + +// unlink +#define GO(A) \ +static uintptr_t my_unlink_fct_##A = 0; \ +static void my_unlink_##A(void* a, unsigned long b, const char* c) \ +{ \ + RunFunction(my_context, my_unlink_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_unlink_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_unlink_fct_##A == (uintptr_t)fct) return my_unlink_##A; + SUPER() + #undef GO + #define GO(A) if(my_unlink_fct_##A == 0) {my_unlink_fct_##A = (uintptr_t)fct; return my_unlink_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse unlink callback\n"); + return NULL; +} + +// rmdir +#define GO(A) \ +static uintptr_t my_rmdir_fct_##A = 0; \ +static void my_rmdir_##A(void* a, unsigned long b, const char* c) \ +{ \ + RunFunction(my_context, my_rmdir_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_rmdir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_rmdir_fct_##A == (uintptr_t)fct) return my_rmdir_##A; + SUPER() + #undef GO + #define GO(A) if(my_rmdir_fct_##A == 0) {my_rmdir_fct_##A = (uintptr_t)fct; return my_rmdir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse rmdir callback\n"); + return NULL; +} + +// symlink +#define GO(A) \ +static uintptr_t my_symlink_fct_##A = 0; \ +static void my_symlink_##A(void* a, const char* b, unsigned long c, const char* d) \ +{ \ + RunFunction(my_context, my_symlink_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_symlink_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_symlink_fct_##A == (uintptr_t)fct) return my_symlink_##A; + SUPER() + #undef GO + #define GO(A) if(my_symlink_fct_##A == 0) {my_symlink_fct_##A = (uintptr_t)fct; return my_symlink_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse symlink callback\n"); + return NULL; +} + +// rename +#define GO(A) \ +static uintptr_t my_rename_fct_##A = 0; \ +static void my_rename_##A(void* a, unsigned long b, const char* c, unsigned long d, const char* e) \ +{ \ + RunFunction(my_context, my_rename_fct_##A, 5, a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_rename_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_rename_fct_##A == (uintptr_t)fct) return my_rename_##A; + SUPER() + #undef GO + #define GO(A) if(my_rename_fct_##A == 0) {my_rename_fct_##A = (uintptr_t)fct; return my_rename_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse rename callback\n"); + return NULL; +} + +// link +#define GO(A) \ +static uintptr_t my_link_fct_##A = 0; \ +static void my_link_##A(void* a, unsigned long b, unsigned long c, const char* d) \ +{ \ + RunFunction(my_context, my_link_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_link_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_link_fct_##A == (uintptr_t)fct) return my_link_##A; + SUPER() + #undef GO + #define GO(A) if(my_link_fct_##A == 0) {my_link_fct_##A = (uintptr_t)fct; return my_link_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse link callback\n"); + return NULL; +} + +// open +#define GO(A) \ +static uintptr_t my_open_fct_##A = 0; \ +static void my_open_##A(void* a, unsigned long b, const char* c)\ +{ \ + RunFunction(my_context, my_open_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_open_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_open_fct_##A == (uintptr_t)fct) return my_open_##A; + SUPER() + #undef GO + #define GO(A) if(my_open_fct_##A == 0) {my_open_fct_##A = (uintptr_t)fct; return my_open_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse open callback\n"); + return NULL; +} + +// read +#define GO(A) \ +static uintptr_t my_read_fct_##A = 0; \ +static void my_read_##A(void* a, unsigned long b, const char* c, size_t d, off_t e, void* f) \ +{ \ + RunFunction(my_context, my_read_fct_##A, 6, a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_read_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_read_fct_##A == (uintptr_t)fct) return my_read_##A; + SUPER() + #undef GO + #define GO(A) if(my_read_fct_##A == 0) {my_read_fct_##A = (uintptr_t)fct; return my_read_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse read callback\n"); + return NULL; +} + +// write +#define GO(A) \ +static uintptr_t my_write_fct_##A = 0; \ +static void my_write_##A(void* a, unsigned long b, const char* c, size_t d, off_t e, void* f) \ +{ \ + RunFunction(my_context, my_write_fct_##A, 6, a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_write_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_write_fct_##A == (uintptr_t)fct) return my_write_##A; + SUPER() + #undef GO + #define GO(A) if(my_write_fct_##A == 0) {my_write_fct_##A = (uintptr_t)fct; return my_write_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse write callback\n"); + return NULL; +} + +// flush +#define GO(A) \ +static uintptr_t my_flush_fct_##A = 0; \ +static void my_flush_##A(void* a, unsigned long b, const char* c) \ +{ \ + RunFunction(my_context, my_flush_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_flush_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_flush_fct_##A == (uintptr_t)fct) return my_flush_##A; + SUPER() + #undef GO + #define GO(A) if(my_flush_fct_##A == 0) {my_flush_fct_##A = (uintptr_t)fct; return my_flush_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse flush callback\n"); + return NULL; +} + +// release +#define GO(A) \ +static uintptr_t my_release_fct_##A = 0; \ +static void my_release_##A(void* a, unsigned long b, const char* c) \ +{ \ + RunFunction(my_context, my_release_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_release_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_release_fct_##A == (uintptr_t)fct) return my_release_##A; + SUPER() + #undef GO + #define GO(A) if(my_release_fct_##A == 0) {my_release_fct_##A = (uintptr_t)fct; return my_release_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse release callback\n"); + return NULL; +} + +// fsync +#define GO(A) \ +static uintptr_t my_fsync_fct_##A = 0; \ +static void my_fsync_##A(void* a, unsigned long b, int c, void* d) \ +{ \ + RunFunction(my_context, my_fsync_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_fsync_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_fsync_fct_##A == (uintptr_t)fct) return my_fsync_##A; + SUPER() + #undef GO + #define GO(A) if(my_fsync_fct_##A == 0) {my_fsync_fct_##A = (uintptr_t)fct; return my_fsync_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse fsync callback\n"); + return NULL; +} + +// opendir +#define GO(A) \ +static uintptr_t my_opendir_fct_##A = 0; \ +static void my_opendir_##A(void* a, unsigned long b, void* c) \ +{ \ + RunFunction(my_context, my_opendir_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_opendir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_opendir_fct_##A == (uintptr_t)fct) return my_opendir_##A; + SUPER() + #undef GO + #define GO(A) if(my_opendir_fct_##A == 0) {my_opendir_fct_##A = (uintptr_t)fct; return my_opendir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse opendir callback\n"); + return NULL; +} + +// readdir +#define GO(A) \ +static uintptr_t my_readdir_fct_##A = 0; \ +static void my_readdir_##A(void* a, unsigned long b, size_t c, off_t d, void* e) \ +{ \ + RunFunction(my_context, my_readdir_fct_##A, 5, a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_readdir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_readdir_fct_##A == (uintptr_t)fct) return my_readdir_##A; + SUPER() + #undef GO + #define GO(A) if(my_readdir_fct_##A == 0) {my_readdir_fct_##A = (uintptr_t)fct; return my_readdir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse readdir callback\n"); + return NULL; +} + +// releasedir +#define GO(A) \ +static uintptr_t my_releasedir_fct_##A = 0; \ +static void my_releasedir_##A(void* a, unsigned long b, void* c) \ +{ \ + RunFunction(my_context, my_releasedir_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_releasedir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_releasedir_fct_##A == (uintptr_t)fct) return my_releasedir_##A; + SUPER() + #undef GO + #define GO(A) if(my_releasedir_fct_##A == 0) {my_releasedir_fct_##A = (uintptr_t)fct; return my_releasedir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse releasedir callback\n"); + return NULL; +} + +// fsyncdir +#define GO(A) \ +static uintptr_t my_fsyncdir_fct_##A = 0; \ +static void my_fsyncdir_##A(void* a, unsigned long b, int c, void* d) \ +{ \ + RunFunction(my_context, my_fsyncdir_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_fsyncdir_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_fsyncdir_fct_##A == (uintptr_t)fct) return my_fsyncdir_##A; + SUPER() + #undef GO + #define GO(A) if(my_fsyncdir_fct_##A == 0) {my_fsyncdir_fct_##A = (uintptr_t)fct; return my_fsyncdir_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse fsyncdir callback\n"); + return NULL; +} + +// statfs +#define GO(A) \ +static uintptr_t my_statfs_fct_##A = 0; \ +static void my_statfs_##A(void* a, unsigned long b) \ +{ \ + RunFunction(my_context, my_statfs_fct_##A, 2, a, b); \ +} +SUPER() +#undef GO +static void* find_statfs_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_statfs_fct_##A == (uintptr_t)fct) return my_statfs_##A; + SUPER() + #undef GO + #define GO(A) if(my_statfs_fct_##A == 0) {my_statfs_fct_##A = (uintptr_t)fct; return my_statfs_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse statfs callback\n"); + return NULL; +} + +// setxattr +#define GO(A) \ +static uintptr_t my_setxattr_fct_##A = 0; \ +static void my_setxattr_##A(void* a, unsigned long b, const char* c, const char* d, size_t e, int f) \ +{ \ + RunFunction(my_context, my_setxattr_fct_##A, 6, a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_setxattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_setxattr_fct_##A == (uintptr_t)fct) return my_setxattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_setxattr_fct_##A == 0) {my_setxattr_fct_##A = (uintptr_t)fct; return my_setxattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse setxattr callback\n"); + return NULL; +} + +// getxattr +#define GO(A) \ +static uintptr_t my_getxattr_fct_##A = 0; \ +static void my_getxattr_##A(void* a, unsigned long b, const char* c, const char* d, size_t e) \ +{ \ + RunFunction(my_context, my_getxattr_fct_##A, 5, a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_getxattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_getxattr_fct_##A == (uintptr_t)fct) return my_getxattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_getxattr_fct_##A == 0) {my_getxattr_fct_##A = (uintptr_t)fct; return my_getxattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse getxattr callback\n"); + return NULL; +} + +// listxattr +#define GO(A) \ +static uintptr_t my_listxattr_fct_##A = 0; \ +static void my_listxattr_##A(void* a, unsigned long b, size_t c)\ +{ \ + RunFunction(my_context, my_listxattr_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_listxattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_listxattr_fct_##A == (uintptr_t)fct) return my_listxattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_listxattr_fct_##A == 0) {my_listxattr_fct_##A = (uintptr_t)fct; return my_listxattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse listxattr callback\n"); + return NULL; +} + +// removexattr +#define GO(A) \ +static uintptr_t my_removexattr_fct_##A = 0; \ +static void my_removexattr_##A(void* a, unsigned long b, const char* c) \ +{ \ + RunFunction(my_context, my_removexattr_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_removexattr_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_removexattr_fct_##A == (uintptr_t)fct) return my_removexattr_##A; + SUPER() + #undef GO + #define GO(A) if(my_removexattr_fct_##A == 0) {my_removexattr_fct_##A = (uintptr_t)fct; return my_removexattr_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse removexattr callback\n"); + return NULL; +} + +// access +#define GO(A) \ +static uintptr_t my_access_fct_##A = 0; \ +static void my_access_##A(void* a, unsigned long b, int c) \ +{ \ + RunFunction(my_context, my_access_fct_##A, 3, a, b, c); \ +} +SUPER() +#undef GO +static void* find_access_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_access_fct_##A == (uintptr_t)fct) return my_access_##A; + SUPER() + #undef GO + #define GO(A) if(my_access_fct_##A == 0) {my_access_fct_##A = (uintptr_t)fct; return my_access_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse access callback\n"); + return NULL; +} + +// create +#define GO(A) \ +static uintptr_t my_create_fct_##A = 0; \ +static void my_create_##A(void* a, unsigned long b, const char* c, mode_t d, void* e) \ +{ \ + RunFunction(my_context, my_create_fct_##A, 5, a, b, c, of_convert(d), e); \ +} +SUPER() +#undef GO +static void* find_create_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_create_fct_##A == (uintptr_t)fct) return my_create_##A; + SUPER() + #undef GO + #define GO(A) if(my_create_fct_##A == 0) {my_create_fct_##A = (uintptr_t)fct; return my_create_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse create callback\n"); + return NULL; +} + +// getlk +#define GO(A) \ +static uintptr_t my_getlk_fct_##A = 0; \ +static void my_getlk_##A(void* a, unsigned long b, void* c, void* d)\ +{ \ + RunFunction(my_context, my_getlk_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_getlk_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_getlk_fct_##A == (uintptr_t)fct) return my_getlk_##A; + SUPER() + #undef GO + #define GO(A) if(my_getlk_fct_##A == 0) {my_getlk_fct_##A = (uintptr_t)fct; return my_getlk_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse getlk callback\n"); + return NULL; +} + +// setlk +#define GO(A) \ +static uintptr_t my_setlk_fct_##A = 0; \ +static void my_setlk_##A(void* a, unsigned long b, void* c, void* d, int e) \ +{ \ + RunFunction(my_context, my_setlk_fct_##A, 5, a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_setlk_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_setlk_fct_##A == (uintptr_t)fct) return my_setlk_##A; + SUPER() + #undef GO + #define GO(A) if(my_setlk_fct_##A == 0) {my_setlk_fct_##A = (uintptr_t)fct; return my_setlk_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse setlk callback\n"); + return NULL; +} + +// bmap +#define GO(A) \ +static uintptr_t my_bmap_fct_##A = 0; \ +static void my_bmap_##A(void* a, unsigned long b, size_t c, uint64_t d) \ +{ \ + RunFunction(my_context, my_bmap_fct_##A, 4, a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_bmap_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_bmap_fct_##A == (uintptr_t)fct) return my_bmap_##A; + SUPER() + #undef GO + #define GO(A) if(my_bmap_fct_##A == 0) {my_bmap_fct_##A = (uintptr_t)fct; return my_bmap_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for Fuse bmap callback\n"); + return NULL; +} + +#undef SUPER + +EXPORT int my_fuse_opt_parse(x64emu_t* emu, void* args, void* data, void* opts, void* f) +{ + libfuse_my_t *my = (libfuse_my_t*)my_lib->priv.w.p2; + return my->fuse_opt_parse(args, data, opts, findfuse_opt_procFct(f)); +} + +EXPORT void* my_fuse_lowlevel_new(x64emu_t* emu, void* args, fuse_lowlevel_ops_t *o, size_t sz, void* data) +{ + libfuse_my_t *my = (libfuse_my_t*)my_lib->priv.w.p2; + static fuse_lowlevel_ops_t o_; + #define GO(A) o_.A = find_##A##_Fct(o->A) + GO(init); + GO(destroy); + GO(lookup); + GO(forget); + GO(getattr); + GO(setattr); + GO(readlink); + GO(mknod); + GO(mkdir); + GO(unlink); + GO(rmdir); + GO(symlink); + GO(rename); + GO(link); + GO(open); + GO(read); + GO(write); + GO(flush); + GO(release); + GO(fsync); + GO(opendir); + GO(readdir); + GO(releasedir); + GO(fsyncdir); + GO(statfs); + GO(setxattr); + GO(getxattr); + GO(listxattr); + GO(removexattr); + GO(access); + GO(create); + GO(getlk); + GO(setlk); + GO(bmap); + #undef GO + return my->fuse_lowlevel_new(args, &o_, sz, data); +} + +#define CUSTOM_INIT \ + lib->priv.w.p2 = getFuseMy(lib); + +#define CUSTOM_FINI \ + freeFuseMy(lib->priv.w.p2); \ + free(lib->priv.w.p2); + +#include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibfuse_private.h b/src/wrapped/wrappedlibfuse_private.h new file mode 100755 index 00000000..b597de26 --- /dev/null +++ b/src/wrapped/wrappedlibfuse_private.h @@ -0,0 +1,179 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +//GO(cuse_lowlevel_main, +//GO(cuse_lowlevel_new, +//GO(cuse_lowlevel_setup, +//GO(cuse_lowlevel_teardown, +//GO(fuse_add_dirent, +//GO(fuse_add_direntry, +//GO(fuse_buf_copy, +//GO(fuse_buf_size, +//GO(fuse_chan_bufsize, +//GO(fuse_chan_data, +//GO(fuse_chan_destroy, +//GO(fuse_chan_fd, +//GO(fuse_chan_new, +//GO(fuse_chan_new_compat24, +//GO(fuse_chan_receive, +//GO(fuse_chan_recv, +//GO(fuse_chan_send, +//GO(fuse_chan_session, +//GO(fuse_clean_cache, +GO(fuse_daemonize, iFi) +//GO(fuse_destroy, +//GO(fuse_dirent_size, +//GO(fuse_exit, +//GO(__fuse_exited, +//GO(fuse_exited, +//GO(fuse_fs_access, +//GO(fuse_fs_bmap, +//GO(fuse_fs_chmod, +//GO(fuse_fs_chown, +//GO(fuse_fs_create, +//GO(fuse_fs_destroy, +//GO(fuse_fs_fallocate, +//GO(fuse_fs_fgetattr, +//GO(fuse_fs_flock, +//GO(fuse_fs_flush, +//GO(fuse_fs_fsync, +//GO(fuse_fs_fsyncdir, +//GO(fuse_fs_ftruncate, +//GO(fuse_fs_getattr, +//GO(fuse_fs_getxattr, +//GO(fuse_fs_init, +//GO(fuse_fs_ioctl, +//GO(fuse_fs_link, +//GO(fuse_fs_listxattr, +//GO(fuse_fs_lock, +//GO(fuse_fs_mkdir, +//GO(fuse_fs_mknod, +//GO(fuse_fs_new, +//GO(fuse_fs_open, +//GO(fuse_fs_opendir, +//GO(fuse_fs_poll, +//GO(fuse_fs_read, +//GO(fuse_fs_read_buf, +//GO(fuse_fs_readdir, +//GO(fuse_fs_readlink, +//GO(fuse_fs_release, +//GO(fuse_fs_releasedir, +//GO(fuse_fs_removexattr, +//GO(fuse_fs_rename, +//GO(fuse_fs_rmdir, +//GO(fuse_fs_setxattr, +//GO(fuse_fs_statfs, +//GO(fuse_fs_symlink, +//GO(fuse_fs_truncate, +//GO(fuse_fs_unlink, +//GO(fuse_fs_utimens, +//GO(fuse_fs_write, +//GO(fuse_fs_write_buf, +//GO(fuse_get_context, +//GO(fuse_getgroups, +//GO(fuse_get_session, +//GO(fuse_interrupted, +//GO(fuse_invalidate, +//GO(fuse_is_lib_option, +//GO(fuse_kern_chan_new, +//GO(fuse_loop, +//GO(__fuse_loop_mt, +//GO(fuse_loop_mt, +//GO(fuse_loop_mt_proc, +//GO(fuse_lowlevel_is_lib_option, +GOM(fuse_lowlevel_new, pFEppLp) +//GO(fuse_lowlevel_new_compat, +//GO(fuse_lowlevel_new_compat25, +//GO(fuse_lowlevel_notify_delete, +//GO(fuse_lowlevel_notify_inval_entry, +//GO(fuse_lowlevel_notify_inval_inode, +//GO(fuse_lowlevel_notify_poll, +//GO(fuse_lowlevel_notify_retrieve, +//GO(fuse_lowlevel_notify_store, +//GO(fuse_main, +//GO(fuse_main_compat1, +//GO(fuse_main_compat2, +//GO(fuse_main_real, +//GO(fuse_main_real_compat22, +//GO(fuse_main_real_compat25, +GO(fuse_mount, pFpp) +//GO(fuse_mount_compat1, +//GO(fuse_mount_compat22, +//GO(fuse_mount_compat25, +//GO(fuse_new, +//GO(fuse_new_compat1, +//GO(fuse_new_compat2, +//GO(fuse_new_compat22, +//GO(fuse_new_compat25, +//GO(fuse_notify_poll, +//GO(fuse_opt_add_arg, +//GO(fuse_opt_add_opt, +//GO(fuse_opt_add_opt_escaped, +GO(fuse_opt_free_args, vFp) +//GO(fuse_opt_insert_arg, +//GO(fuse_opt_match, +GOM(fuse_opt_parse, iFEpppp) +GO(fuse_parse_cmdline, iFpppp) +//GO(fuse_pollhandle_destroy, +//GO(__fuse_process_cmd, +//GO(fuse_process_cmd, +//GO(__fuse_read_cmd, +//GO(fuse_read_cmd, +//GO(fuse_register_module, +GO(fuse_remove_signal_handlers, vFp) +//GO(fuse_reply_attr, +//GO(fuse_reply_bmap, +//GO(fuse_reply_buf, +//GO(fuse_reply_create, +//GO(fuse_reply_data, +//GO(fuse_reply_entry, +//GO(fuse_reply_err, +//GO(fuse_reply_ioctl, +//GO(fuse_reply_ioctl_iov, +//GO(fuse_reply_ioctl_retry, +//GO(fuse_reply_iov, +//GO(fuse_reply_lock, +//GO(fuse_reply_none, +//GO(fuse_reply_open, +//GO(fuse_reply_open_compat, +//GO(fuse_reply_poll, +//GO(fuse_reply_readlink, +//GO(fuse_reply_statfs, +//GO(fuse_reply_statfs_compat, +//GO(fuse_reply_write, +//GO(fuse_reply_xattr, +//GO(fuse_req_ctx, +//GO(fuse_req_getgroups, +//GO(fuse_req_interrupted, +//GO(fuse_req_interrupt_func, +//GO(fuse_req_userdata, +GO(fuse_session_add_chan, vFpp) +//GO(fuse_session_data, +GO(fuse_session_destroy, vFp) +//GO(fuse_session_exit, +//GO(fuse_session_exited, +GO(fuse_session_loop, iFp) +GO(fuse_session_loop_mt, iFp) +//GO(fuse_session_new, +//GO(fuse_session_next_chan, +//GO(fuse_session_process, +//GO(fuse_session_process_buf, +GO(fuse_session_remove_chan, vFp) +//GO(fuse_session_reset, +//GO(__fuse_set_getcontext_func, +//GO(fuse_set_getcontext_func, +GO(fuse_set_signal_handlers, iFp) +//GO(__fuse_setup, +//GO(fuse_setup, +//GO(fuse_setup_compat2, +//GO(fuse_setup_compat22, +//GO(fuse_setup_compat25, +//GO(fuse_start_cleanup_thread, +//GO(fuse_stop_cleanup_thread, +//GO(__fuse_teardown, +//GO(fuse_teardown, +//GO(fuse_teardown_compat22, +//GO(fuse_unmount, +//GO(fuse_unmount_compat22, +//GO(fuse_version, diff --git a/src/wrapped/wrappedlibx11_private.h b/src/wrapped/wrappedlibx11_private.h index d8d4c939..fc5b33ef 100755 --- a/src/wrapped/wrappedlibx11_private.h +++ b/src/wrapped/wrappedlibx11_private.h @@ -240,7 +240,7 @@ DATAB(_Xdebug, sizeof(void*)) GO(XDefaultColormap, pFpi) //GO(XDefaultColormapOfScreen GO(XDefaultDepth, iFpi) -//GO(XDefaultDepthOfScreen +GO(XDefaultDepthOfScreen, iFp) // _XDefaultError GO(XDefaultGC, pFpi) //GO(XDefaultGCOfScreen |