Loading src/client/gkfs_libc.cpp +127 −0 Original line number Diff line number Diff line Loading @@ -2572,3 +2572,130 @@ renameat2(int olddirfd, const char* oldpath, int newdirfd, const char* newpath, } GKFS_FALLBACK(renameat2, olddirfd, oldpath, newdirfd, newpath, flags); } CDLSYM_WRAPPER(int, aio_fsync, (int op, struct aiocb* aiocbp), (op, aiocbp), "aio_fsync") CDLSYM_WRAPPER(int, aio_fsync64, (int op, struct aiocb64* aiocbp), (op, aiocbp), "aio_fsync64") CDLSYM_WRAPPER(int, aio_suspend, (const struct aiocb* const list[], int nent, const struct timespec* timeout), (list, nent, timeout), "aio_suspend") CDLSYM_WRAPPER(int, aio_suspend64, (const struct aiocb64* const list[], int nent, const struct timespec* timeout), (list, nent, timeout), "aio_suspend64") CDLSYM_WRAPPER(int, aio_cancel, (int fildes, struct aiocb* aiocbp), (fildes, aiocbp), "aio_cancel") CDLSYM_WRAPPER(int, aio_cancel64, (int fildes, struct aiocb64* aiocbp), (fildes, aiocbp), "aio_cancel64") CDLSYM_WRAPPER(void, aio_init, (const struct aioinit* init), (init), "aio_init") CDLSYM_WRAPPER(int, aio_write64, (struct aiocb64 * aiocbp), (aiocbp), "aio_write64") CDLSYM_WRAPPER(int, aio_read64, (struct aiocb64 * aiocbp), (aiocbp), "aio_read64") CDLSYM_WRAPPER(int, aio_listio, (int mode, struct aiocb* const list[], int nent, struct sigevent* sig), (mode, list, nent, sig), "aio_listio") CDLSYM_WRAPPER(int, aio_listio64, (int mode, struct aiocb64* const list[], int nent, struct sigevent* sig), (mode, list, nent, sig), "aio_listio64") CDLSYM_WRAPPER(int, aio_error64, (const struct aiocb64* aiocbp), (aiocbp), "aio_error64") // CDLSYM_WRAPPER(int, aio_return64, // (struct aiocb64 *aiocbp), // (aiocbp), "aio_return64") // DLSYM_WRAPPER(long, syscall, (long number, char* cmd, void* arg, void* env), // (number, cmd, arg, env), "syscall") CDLSYM_WRAPPER(char*, getwd, (char* buffer), (buffer), "getwd") // how to pass no argumens (void)? // CDLSYM_WRAPPER(char *, get_current_dir_name, // (void a), // (a), "get_current_dir_name") CDLSYM_WRAPPER(int, readdir_r, (DIR * dirstream, struct dirent* entry, struct dirent** result), (dirstream, entry, result), "readdir_r") CDLSYM_WRAPPER(int, readdir64_r, (DIR * dirstream, struct dirent64* entry, struct dirent64** result), (dirstream, entry, result), "readdir64_r") CDLSYM_WRAPPER(int, alphasort, (const struct dirent** a, const struct dirent** b), (a, b), "alphasort") CDLSYM_WRAPPER(int, versionsort, (const struct dirent** a, const struct dirent** b), (a, b), "versionsort") // int scandir64 (const char *dir, struct dirent64 ***namelist, int (*selector) // (const struct dirent64 *), int (*cmp) (const struct dirent64 **, const struct // dirent64 **)) CDLSYM_WRAPPER(int, scandir64, (const struct dirent64** a, const struct dirent** b), (a, b), "scandir64") CDLSYM_WRAPPER(int, versionsort64, (const struct dirent64** a, const struct dirent64** b), (a, b), "versionsort64") CDLSYM_WRAPPER(ssize_t, getdents64, (int fd, void* buffer, size_t length), (fd, buffer, length), "getdents64") // CDLSYM_WRAPPER(int, ftw, // (const char *filename, __ftw_func_t func, int descriptors), // (filename, func, descriptors), "ftw") // CDLSYM_WRAPPER(int, ftw64, // (const char *filename, __ftw_func_t func, int descriptors), // (filename, func, descriptors), "ftw64") // CDLSYM_WRAPPER(int, nftw, // (const char *filename, __nftw_func_t func, int descriptors, // int flag), (filename, func, descriptors, flag), "nftw") // CDLSYM_WRAPPER(int, nftw64, // (const char *filename, __nftw_func_t func, int descriptors, // int flag), (filename, func, descriptors, flag), "nftw64") CDLSYM_WRAPPER(int, link, (const char* oldname, const char* newname), (oldname, newname), "link") CDLSYM_WRAPPER(int, linkat, (int oldfd, const char* oldname, int newfd, const char* newname, int flags), (oldfd, oldname, newfd, newname, flags), "linkat") CDLSYM_WRAPPER(char*, canonicalize_file_name, (const char* name), (name), "canonicalize_file_name") CDLSYM_WRAPPER(mode_t, umask, (mode_t mask), (mask), "umask") // CDLSYM_WRAPPER(mode_t, getumask // (void), // (), "getumask",) CDLSYM_WRAPPER(int, utime, (const char* filename, const struct utimbuf* times), (filename, times), "utime") CDLSYM_WRAPPER(int, lutime, (const char* filename, const struct timeval tvp[2]), (filename, tvp), "lutimes") CDLSYM_WRAPPER(int, truncate, (const char* filename, off_t length), (filename, length), "truncate") CDLSYM_WRAPPER(int, truncate64, (const char* name, off64_t length), (name, length), "truncate64") CDLSYM_WRAPPER(int, ftruncate64, (int id, off64_t length), (id, length), "ftruncate64") CDLSYM_WRAPPER(int, posix_fallocate, (int fd, off_t offset, off_t length), (fd, offset, length), "posix_fallocate") CDLSYM_WRAPPER(int, mknod, (const char* filename, mode_t mode, dev_t dev), (filename, mode, dev), "mknod") // CDLSYM_WRAPPER(FILE *, tmpfile, (void), // (), "tmpfile") // CDLSYM_WRAPPER(FILE *, tmpfile64, (void), // (), "tmpfile64") // I dont know the symbol // CDLSYM_WRAPPER(char *, tmpname, (char * result), // (result), "tmpname") // Is it the right symbol? CDLSYM_WRAPPER(char*, tmpname_r, (char* result), (result), "tmpnam_r") CDLSYM_WRAPPER(char*, tempnam, (const char* dir, const char* prefix), (dir, prefix), "tempnam") CDLSYM_WRAPPER(char*, mktemp, (char* templatee), (templatee), "mktemp") CDLSYM_WRAPPER(char*, mkdtemp, (const char* filename, int flags, mode_t mode), (filename, flags, mode), "mkdtemp") CDLSYM_WRAPPER(int, creat64, (const char* filename, mode_t mode), (filename, mode), "creat64") Loading
src/client/gkfs_libc.cpp +127 −0 Original line number Diff line number Diff line Loading @@ -2572,3 +2572,130 @@ renameat2(int olddirfd, const char* oldpath, int newdirfd, const char* newpath, } GKFS_FALLBACK(renameat2, olddirfd, oldpath, newdirfd, newpath, flags); } CDLSYM_WRAPPER(int, aio_fsync, (int op, struct aiocb* aiocbp), (op, aiocbp), "aio_fsync") CDLSYM_WRAPPER(int, aio_fsync64, (int op, struct aiocb64* aiocbp), (op, aiocbp), "aio_fsync64") CDLSYM_WRAPPER(int, aio_suspend, (const struct aiocb* const list[], int nent, const struct timespec* timeout), (list, nent, timeout), "aio_suspend") CDLSYM_WRAPPER(int, aio_suspend64, (const struct aiocb64* const list[], int nent, const struct timespec* timeout), (list, nent, timeout), "aio_suspend64") CDLSYM_WRAPPER(int, aio_cancel, (int fildes, struct aiocb* aiocbp), (fildes, aiocbp), "aio_cancel") CDLSYM_WRAPPER(int, aio_cancel64, (int fildes, struct aiocb64* aiocbp), (fildes, aiocbp), "aio_cancel64") CDLSYM_WRAPPER(void, aio_init, (const struct aioinit* init), (init), "aio_init") CDLSYM_WRAPPER(int, aio_write64, (struct aiocb64 * aiocbp), (aiocbp), "aio_write64") CDLSYM_WRAPPER(int, aio_read64, (struct aiocb64 * aiocbp), (aiocbp), "aio_read64") CDLSYM_WRAPPER(int, aio_listio, (int mode, struct aiocb* const list[], int nent, struct sigevent* sig), (mode, list, nent, sig), "aio_listio") CDLSYM_WRAPPER(int, aio_listio64, (int mode, struct aiocb64* const list[], int nent, struct sigevent* sig), (mode, list, nent, sig), "aio_listio64") CDLSYM_WRAPPER(int, aio_error64, (const struct aiocb64* aiocbp), (aiocbp), "aio_error64") // CDLSYM_WRAPPER(int, aio_return64, // (struct aiocb64 *aiocbp), // (aiocbp), "aio_return64") // DLSYM_WRAPPER(long, syscall, (long number, char* cmd, void* arg, void* env), // (number, cmd, arg, env), "syscall") CDLSYM_WRAPPER(char*, getwd, (char* buffer), (buffer), "getwd") // how to pass no argumens (void)? // CDLSYM_WRAPPER(char *, get_current_dir_name, // (void a), // (a), "get_current_dir_name") CDLSYM_WRAPPER(int, readdir_r, (DIR * dirstream, struct dirent* entry, struct dirent** result), (dirstream, entry, result), "readdir_r") CDLSYM_WRAPPER(int, readdir64_r, (DIR * dirstream, struct dirent64* entry, struct dirent64** result), (dirstream, entry, result), "readdir64_r") CDLSYM_WRAPPER(int, alphasort, (const struct dirent** a, const struct dirent** b), (a, b), "alphasort") CDLSYM_WRAPPER(int, versionsort, (const struct dirent** a, const struct dirent** b), (a, b), "versionsort") // int scandir64 (const char *dir, struct dirent64 ***namelist, int (*selector) // (const struct dirent64 *), int (*cmp) (const struct dirent64 **, const struct // dirent64 **)) CDLSYM_WRAPPER(int, scandir64, (const struct dirent64** a, const struct dirent** b), (a, b), "scandir64") CDLSYM_WRAPPER(int, versionsort64, (const struct dirent64** a, const struct dirent64** b), (a, b), "versionsort64") CDLSYM_WRAPPER(ssize_t, getdents64, (int fd, void* buffer, size_t length), (fd, buffer, length), "getdents64") // CDLSYM_WRAPPER(int, ftw, // (const char *filename, __ftw_func_t func, int descriptors), // (filename, func, descriptors), "ftw") // CDLSYM_WRAPPER(int, ftw64, // (const char *filename, __ftw_func_t func, int descriptors), // (filename, func, descriptors), "ftw64") // CDLSYM_WRAPPER(int, nftw, // (const char *filename, __nftw_func_t func, int descriptors, // int flag), (filename, func, descriptors, flag), "nftw") // CDLSYM_WRAPPER(int, nftw64, // (const char *filename, __nftw_func_t func, int descriptors, // int flag), (filename, func, descriptors, flag), "nftw64") CDLSYM_WRAPPER(int, link, (const char* oldname, const char* newname), (oldname, newname), "link") CDLSYM_WRAPPER(int, linkat, (int oldfd, const char* oldname, int newfd, const char* newname, int flags), (oldfd, oldname, newfd, newname, flags), "linkat") CDLSYM_WRAPPER(char*, canonicalize_file_name, (const char* name), (name), "canonicalize_file_name") CDLSYM_WRAPPER(mode_t, umask, (mode_t mask), (mask), "umask") // CDLSYM_WRAPPER(mode_t, getumask // (void), // (), "getumask",) CDLSYM_WRAPPER(int, utime, (const char* filename, const struct utimbuf* times), (filename, times), "utime") CDLSYM_WRAPPER(int, lutime, (const char* filename, const struct timeval tvp[2]), (filename, tvp), "lutimes") CDLSYM_WRAPPER(int, truncate, (const char* filename, off_t length), (filename, length), "truncate") CDLSYM_WRAPPER(int, truncate64, (const char* name, off64_t length), (name, length), "truncate64") CDLSYM_WRAPPER(int, ftruncate64, (int id, off64_t length), (id, length), "ftruncate64") CDLSYM_WRAPPER(int, posix_fallocate, (int fd, off_t offset, off_t length), (fd, offset, length), "posix_fallocate") CDLSYM_WRAPPER(int, mknod, (const char* filename, mode_t mode, dev_t dev), (filename, mode, dev), "mknod") // CDLSYM_WRAPPER(FILE *, tmpfile, (void), // (), "tmpfile") // CDLSYM_WRAPPER(FILE *, tmpfile64, (void), // (), "tmpfile64") // I dont know the symbol // CDLSYM_WRAPPER(char *, tmpname, (char * result), // (result), "tmpname") // Is it the right symbol? CDLSYM_WRAPPER(char*, tmpname_r, (char* result), (result), "tmpnam_r") CDLSYM_WRAPPER(char*, tempnam, (const char* dir, const char* prefix), (dir, prefix), "tempnam") CDLSYM_WRAPPER(char*, mktemp, (char* templatee), (templatee), "mktemp") CDLSYM_WRAPPER(char*, mkdtemp, (const char* filename, int flags, mode_t mode), (filename, flags, mode), "mkdtemp") CDLSYM_WRAPPER(int, creat64, (const char* filename, mode_t mode), (filename, mode), "creat64")