diff --git a/blink/hostfs.c b/blink/hostfs.c index 4d431a364..ecd9bb9de 100644 --- a/blink/hostfs.c +++ b/blink/hostfs.c @@ -16,10 +16,11 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include #include #include #include -#include +#include #include #include #include @@ -176,7 +177,6 @@ int HostfsCreateInfo(struct HostfsInfo **output) { } int HostfsGetHostPath(struct VfsInfo *info, char **output) { - struct HostfsInfo *hostfsinfo; struct HostfsDevice *hostfsdevice; char *path, *hostpath; size_t pathlen, sourcelen; @@ -184,7 +184,6 @@ int HostfsGetHostPath(struct VfsInfo *info, char **output) { efault(); return -1; } - hostfsinfo = (struct HostfsInfo *)info->data; hostfsdevice = (struct HostfsDevice *)info->device->data; if (VfsPathBuild(info, info->device->root, &path) == -1) { return -1; @@ -210,9 +209,7 @@ int HostfsGetHostPath(struct VfsInfo *info, char **output) { int HostfsGetDirFd(struct VfsInfo *dir) { struct HostfsInfo *dirinfo; - struct HostfsDevice *hostfsdevice; - char *path, *hostpath; - size_t pathlen, sourcelen; + char *hostpath; int ret = -1; if (dir == NULL) { efault(); @@ -223,7 +220,6 @@ int HostfsGetDirFd(struct VfsInfo *dir) { return -1; } dirinfo = (struct HostfsInfo *)dir->data; - hostfsdevice = (struct HostfsDevice *)dir->device->data; if (dirinfo->filefd != -1) { return dup(dirinfo->filefd); } else { @@ -556,7 +552,6 @@ int HostfsUnlink(struct VfsInfo *parent, const char *name, int flags) { ssize_t HostfsRead(struct VfsInfo *info, void *buf, size_t size) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsRead(%p, %p, %ld)", info, buf, size); if (info == NULL || buf == NULL) { return efault(); @@ -567,7 +562,6 @@ ssize_t HostfsRead(struct VfsInfo *info, void *buf, size_t size) { ssize_t HostfsWrite(struct VfsInfo *info, const void *buf, size_t size) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsWrite(%p, %p, %ld)", info, buf, size); if (info == NULL || buf == NULL) { return efault(); @@ -579,7 +573,6 @@ ssize_t HostfsWrite(struct VfsInfo *info, const void *buf, size_t size) { ssize_t HostfsPread(struct VfsInfo *info, void *buf, size_t size, off_t offset) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsPread(%p, %p, %ld, %ld)", info, buf, size, offset); if (info == NULL || buf == NULL) { return efault(); @@ -591,7 +584,6 @@ ssize_t HostfsPread(struct VfsInfo *info, void *buf, size_t size, ssize_t HostfsPwrite(struct VfsInfo *info, const void *buf, size_t size, off_t offset) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsPwrite(%p, %p, %ld, %ld)", info, buf, size, offset); if (info == NULL || buf == NULL) { return efault(); @@ -602,7 +594,6 @@ ssize_t HostfsPwrite(struct VfsInfo *info, const void *buf, size_t size, ssize_t HostfsReadv(struct VfsInfo *info, const struct iovec *iov, int iovcnt) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsReadv(%p, %p, %d)", info, iov, iovcnt); if (info == NULL || iov == NULL) { return efault(); @@ -614,7 +605,6 @@ ssize_t HostfsReadv(struct VfsInfo *info, const struct iovec *iov, int iovcnt) { ssize_t HostfsWritev(struct VfsInfo *info, const struct iovec *iov, int iovcnt) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsWritev(%p, %p, %d)", info, iov, iovcnt); if (info == NULL || iov == NULL) { return efault(); @@ -626,7 +616,6 @@ ssize_t HostfsWritev(struct VfsInfo *info, const struct iovec *iov, ssize_t HostfsPreadv(struct VfsInfo *info, const struct iovec *iov, int iovcnt, off_t offset) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsPreadv(%p, %p, %d, %ld)", info, iov, iovcnt, offset); if (info == NULL || iov == NULL) { return efault(); @@ -638,7 +627,6 @@ ssize_t HostfsPreadv(struct VfsInfo *info, const struct iovec *iov, int iovcnt, ssize_t HostfsPwritev(struct VfsInfo *info, const struct iovec *iov, int iovcnt, off_t offset) { struct HostfsInfo *hostinfo; - ssize_t rc; VFS_LOGF("HostfsPwritev(%p, %p, %d, %ld)", info, iov, iovcnt, offset); if (info == NULL || iov == NULL) { return efault(); @@ -779,7 +767,6 @@ int HostfsIoctl(struct VfsInfo *info, unsigned long request, const void *arg) { int HostfsDup(struct VfsInfo *info, struct VfsInfo **newinfo) { struct HostfsInfo *hostinfo, *newhostinfo; - int rc; VFS_LOGF("HostfsDup(%p, %p)", info, newinfo); if (info == NULL || newinfo == NULL) { return efault(); @@ -837,7 +824,6 @@ int HostfsDup(struct VfsInfo *info, struct VfsInfo **newinfo) { #ifdef HAVE_DUP3 int HostfsDup3(struct VfsInfo *info, struct VfsInfo **newinfo, int flags) { struct HostfsInfo *hostinfo, *newhostinfo; - int rc; VFS_LOGF("HostfsDup3(%p, %p, %i)", info, newinfo, flags); if (info == NULL || newinfo == NULL) { return efault(); @@ -1046,7 +1032,7 @@ int HostfsConnect(struct VfsInfo *info, const struct sockaddr *addr, int HostfsConnectUnix(struct VfsInfo *sock, struct VfsInfo *info, const struct sockaddr_un *addr, socklen_t addrlen) { - struct HostfsInfo *hostinfo, *sockinfo; + struct HostfsInfo *hostinfo; struct sockaddr_un *hostun; socklen_t hostlen; char *hostpath; @@ -1163,7 +1149,7 @@ ssize_t HostfsSendmsg(struct VfsInfo *info, const struct msghdr *msg, ssize_t HostfsRecvmsgUnix(struct VfsInfo *sock, struct VfsInfo *info, struct msghdr *msg, int flags) { - struct HostfsInfo *hostinfo, *sockinfo; + struct HostfsInfo *hostinfo; struct sockaddr_un *hostun, *oldun; socklen_t hostlen, oldlen; char *hostpath; @@ -1200,7 +1186,7 @@ ssize_t HostfsRecvmsgUnix(struct VfsInfo *sock, struct VfsInfo *info, ssize_t HostfsSendmsgUnix(struct VfsInfo *sock, struct VfsInfo *info, const struct msghdr *msg, int flags) { - struct HostfsInfo *hostinfo, *sockinfo; + struct HostfsInfo *hostinfo; struct msghdr newmsg; struct sockaddr_un *hostun; socklen_t hostlen; @@ -1262,7 +1248,6 @@ int HostfsGetsockname(struct VfsInfo *info, struct sockaddr *addr, struct HostfsInfo *hostinfo; struct sockaddr_un *un; char *path; - socklen_t len; VFS_LOGF("HostfsGetsockname(%p, %p, %p)", info, addr, addrlen); if (info == NULL || addr == NULL || addrlen == NULL) { return efault(); @@ -1296,7 +1281,7 @@ int HostfsGetpeername(struct VfsInfo *info, struct sockaddr *addr, socklen_t *addrlen) { struct HostfsInfo *hostinfo; struct sockaddr_un *hostun; - socklen_t hostlen = sizeof(hostun); + socklen_t hostlen = sizeof(*hostun); char *s; VFS_LOGF("HostfsGetpeername(%p, %p, %p)", info, addr, addrlen); if (info == NULL || addr == NULL || addrlen == NULL) { diff --git a/blink/syscall.c b/blink/syscall.c index de5e813f7..8a31743ea 100644 --- a/blink/syscall.c +++ b/blink/syscall.c @@ -2579,7 +2579,7 @@ static i64 SysSendfile(struct Machine *m, i32 out_fd, i32 in_fd, i64 offsetaddr, return eoverflow(); } } - for (toto = 0; toto < count; ) { + for (toto = 0; toto < count;) { chunk = MIN(count - toto, maxchunk); if (offsetp) { got = VfsPread(in_fd, buf, chunk, offset + toto); @@ -2781,7 +2781,7 @@ static int XlatFaccessatFlags(int x) { static int SysFaccessat2(struct Machine *m, i32 dirfd, i64 path, i32 mode, i32 flags) { return VfsAccess(GetDirFildes(dirfd), LoadStr(m, path), XlatAccess(mode), - XlatFaccessatFlags(flags)); + XlatFaccessatFlags(flags)); } static int SysFaccessat(struct Machine *m, i32 dirfd, i64 path, i32 mode) { @@ -2844,8 +2844,8 @@ static int SysFstatat(struct Machine *m, i32 dirfd, i64 pathaddr, i64 staddr, } #endif #endif - if ((rc = VfsStat(GetDirFildes(dirfd), path, &st, - XlatFstatatFlags(flags))) != -1) { + if ((rc = VfsStat(GetDirFildes(dirfd), path, &st, XlatFstatatFlags(flags))) != + -1) { XlatStatToLinux(&gst, &st); if (CopyToUserWrite(m, staddr, &gst, sizeof(gst)) == -1) rc = -1; } @@ -2899,7 +2899,7 @@ static int SysFchownat(struct Machine *m, i32 dirfd, i64 pathaddr, u32 uid, #endif #endif return VfsChown(GetDirFildes(dirfd), path, uid, gid, - XlatFchownatFlags(flags)); + XlatFchownatFlags(flags)); } static int SysChown(struct Machine *m, i64 pathaddr, u32 uid, u32 gid) { @@ -2967,9 +2967,9 @@ static int CheckSyncable(int fildes) { // question though is if FreeBSD actually does something here. struct stat st; if (!VfsFstat(fildes, &st) && // - (S_ISCHR(st.st_mode) || // - S_ISFIFO(st.st_mode) || // - S_ISLNK(st.st_mode) || // + (S_ISCHR(st.st_mode) || // + S_ISFIFO(st.st_mode) || // + S_ISLNK(st.st_mode) || // S_ISSOCK(st.st_mode))) { return einval(); } @@ -3300,8 +3300,8 @@ static ssize_t SysReadlinkat(struct Machine *m, int dirfd, i64 path, // implementations (e.g. Musl) consider it to be posixly incorrect. if (bufsiz <= 0) return einval(); if (!(buf = (char *)AddToFreeList(m, malloc(bufsiz)))) return -1; - if ((rc = VfsReadlink(GetDirFildes(dirfd), LoadStr(m, path), buf, - bufsiz)) != -1) { + if ((rc = VfsReadlink(GetDirFildes(dirfd), LoadStr(m, path), buf, bufsiz)) != + -1) { if (CopyToUserWrite(m, bufaddr, buf, rc) == -1) rc = -1; } return rc; @@ -3327,7 +3327,7 @@ static int SysTruncate(struct Machine *m, i64 pathaddr, i64 length) { static int SysSymlinkat(struct Machine *m, i64 targetpath, i32 newdirfd, i64 linkpath) { return VfsSymlink(LoadStr(m, targetpath), GetDirFildes(newdirfd), - LoadStr(m, linkpath)); + LoadStr(m, linkpath)); } static int SysSymlink(struct Machine *m, i64 targetpath, i64 linkpath) { @@ -3443,7 +3443,7 @@ static int SysRenameat2(struct Machine *m, int srcdirfd, i64 srcpath, return -1; } return VfsRename(GetDirFildes(srcdirfd), LoadStr(m, srcpath), - GetDirFildes(dstdirfd), dstpath); + GetDirFildes(dstdirfd), dstpath); } static int SysRenameat(struct Machine *m, int srcdirfd, i64 srcpath, @@ -3478,8 +3478,8 @@ static i32 SysLinkat(struct Machine *m, // i64 newpath, // i32 flags) { return VfsLink(GetDirFildes(olddirfd), LoadStr(m, oldpath), - GetDirFildes(newdirfd), LoadStr(m, newpath), - XlatLinkatFlags(flags)); + GetDirFildes(newdirfd), LoadStr(m, newpath), + XlatLinkatFlags(flags)); } static int SysLink(struct Machine *m, i64 existingpath, i64 newpath) { @@ -4398,11 +4398,10 @@ static i32 Select(struct Machine *m, // int fildes, rc; i32 setsize; u64 oldmask_guest = 0; - sigset_t block, oldmask; fd_set readfds, writefds, exceptfds, readyreadfds, readywritefds, readyexceptfds; struct pollfd hfds[1]; - struct timespec *tp, now, wait, remain, deadline = {0}; + struct timespec now, wait, remain, deadline = {0}; struct Fd *fd; int (*poll_impl)(struct pollfd *, nfds_t, int); if (timeoutp) { @@ -4469,8 +4468,8 @@ static i32 Select(struct Machine *m, // if (fd) { hfds[0].fd = fildes; hfds[0].events = ((FD_ISSET(fildes, &readfds) ? POLLIN : 0) | - (FD_ISSET(fildes, &writefds) ? POLLOUT : 0) | - (FD_ISSET(fildes, &exceptfds) ? POLLPRI : 0)); + (FD_ISSET(fildes, &writefds) ? POLLOUT : 0) | + (FD_ISSET(fildes, &exceptfds) ? POLLPRI : 0)); switch (poll_impl(hfds, 1, 0)) { case 0: break; @@ -4521,8 +4520,10 @@ static i32 Select(struct Machine *m, // SIG_LOGF("sigmask pop %" PRIx64, m->sigmask); } if (rc != -1) { - if ((readfds_addr && SaveFdSet(m, nfds, &readyreadfds, readfds_addr) == -1) || - (writefds_addr && SaveFdSet(m, nfds, &readywritefds, writefds_addr) == -1) || + if ((readfds_addr && + SaveFdSet(m, nfds, &readyreadfds, readfds_addr) == -1) || + (writefds_addr && + SaveFdSet(m, nfds, &readywritefds, writefds_addr) == -1) || (exceptfds_addr && SaveFdSet(m, nfds, &readyexceptfds, exceptfds_addr) == -1)) { return -1; diff --git a/blink/vfs.c b/blink/vfs.c index d8d6314c4..adbc53637 100644 --- a/blink/vfs.c +++ b/blink/vfs.c @@ -207,14 +207,12 @@ int VfsMount(const char *source, const char *target, const char *fstype, u64 flags, const void *data) { struct VfsInfo *targetinfo; struct VfsSystem *newsystem, *s; - struct VfsDevice *targetdevice, *newdevice, *d; + struct VfsDevice *targetdevice = 0, *newdevice, *d; struct VfsMount *newmount; struct Dll *e; - char *newname; - bool silent = false; + char *newname = 0; i64 nextdev; if (flags & MS_SILENT_LINUX) { - silent = true; flags &= ~MS_SILENT_LINUX; } if (flags) { @@ -736,7 +734,7 @@ int VfsSetFd(int fd, struct VfsInfo *data) { dll_init(&vfsfd->elem); if (e == NULL) { dll_make_last(&g_vfs.fds, &vfsfd->elem); - } else if (e = dll_prev(g_vfs.fds, e)) { + } else if ((e = dll_prev(g_vfs.fds, e))) { dll_splice_after(e, &vfsfd->elem); } else { dll_make_first(&g_vfs.fds, &vfsfd->elem); @@ -1035,7 +1033,7 @@ int VfsOpen(int dirfd, const char *name, int flags, int mode) { } int VfsChmod(int dirfd, const char *name, mode_t mode, int flags) { - struct VfsInfo *dir, *tmp; + struct VfsInfo *dir; char *newname; int ret = 0; VFS_LOGF("VfsChmod(%d, \"%s\", %d, %d)", dirfd, name, mode, flags); @@ -1270,7 +1268,7 @@ ssize_t VfsReadlink(int dirfd, const char *name, char *buf, size_t bufsiz) { int VfsLink(int olddirfd, const char *oldname, int newdirfd, const char *newname, int flags) { - struct VfsInfo *olddir, *newdir, *file; + struct VfsInfo *olddir, *newdir; char *newoldname, *newnewname; int ret; VFS_LOGF("VfsLink(%d, \"%s\", %d, \"%s\", %d)", olddirfd, oldname, newdirfd, @@ -1313,7 +1311,7 @@ int VfsUtime(int dirfd, const char *name, const struct timespec times[2], int flags) { struct VfsInfo *dir; char *newname; - int ret; + int ret = -1; VFS_LOGF("VfsUtime(%d, \"%s\", %p, %d)", dirfd, name, times, flags); if (name == NULL) { return efault(); @@ -1607,8 +1605,7 @@ int VfsFlock(int fd, int operation) { int VfsFcntl(int fd, int cmd, ...) { struct VfsInfo *info; - int ret, tmp; - ; + int ret, tmp = -1; va_list ap; VFS_LOGF("VfsFcntl(%d, %d, ...)", fd, cmd); if (VfsGetFd(fd, &info) == -1) { @@ -1685,8 +1682,6 @@ int VfsDup(int fd) { int VfsDup2(int fd, int newfd) { struct VfsInfo *info, *newinfo; - struct Dll *e; - struct VfsFd *newfdinfo; int ret; VFS_LOGF("VfsDup2(%d, %d)", fd, newfd); if (VfsGetFd(fd, &info) == -1) { @@ -1714,8 +1709,6 @@ int VfsDup2(int fd, int newfd) { #ifdef HAVE_DUP3 int VfsDup3(int fd, int newfd, int flags) { struct VfsInfo *info, *newinfo; - struct Dll *e; - struct VfsFd *newfdinfo; int ret; VFS_LOGF("VfsDup3(%d, %d, %d)", fd, newfd, flags); if (VfsGetFd(fd, &info) == -1) { @@ -1759,8 +1752,6 @@ int VfsPoll(struct pollfd *fds, nfds_t nfds, int timeout) { int VfsSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timespec *timeout, sigset_t *sigmask) { - struct VfsInfo *info; - int ret; VFS_LOGF("VfsSelect(%d, %p, %p, %p, %p, %p)", nfds, readfds, writefds, exceptfds, timeout, sigmask); return enosys(); @@ -1872,7 +1863,6 @@ int VfsClosedir(DIR *dir) { int VfsBind(int fd, const struct sockaddr *addr, socklen_t addrlen) { struct VfsInfo *info, *dir; - const struct sockaddr_un *un; char *newname; int ret; VFS_LOGF("VfsBind(%d, %p, %d)", fd, addr, addrlen); @@ -1882,7 +1872,6 @@ int VfsBind(int fd, const struct sockaddr *addr, socklen_t addrlen) { if (addr->sa_family != AF_UNIX) { ret = HostfsBind(info, addr, addrlen); } else { - un = (const struct sockaddr_un *)addr; if (VfsHandleDirfdName(AT_FDCWD, addr->sa_data, &dir, &newname) == -1) { ret = -1; } else { @@ -2190,7 +2179,7 @@ static int VfsMapListExtractAffectedRange(struct Dll **maps, void *addr, struct Dll **modified, struct Dll **before) { struct Dll *e, *f; - struct VfsMap *map, *newmap, *newmapleft, *newmapright; + struct VfsMap *map, *newmap, *newmapleft = 0, *newmapright = 0; e = dll_first(*maps); while (e && !VfsMemoryRangeOverlap(VFS_MAP_CONTAINER(e)->addr, VFS_MAP_CONTAINER(e)->len, addr, len)) { @@ -2412,7 +2401,7 @@ int VfsMunmap(void *addr, size_t len) { } int VfsMprotect(void *addr, size_t len, int prot) { - struct Dll *e, *f; + struct Dll *e; struct VfsMap *map; struct Dll *original, *modified, *before; VFS_LOGF("VfsMprotect(%p, %zu, %d)", addr, len, prot); @@ -2680,7 +2669,7 @@ int VfsExecve(const char *pathname, char *const *argv, char *const *envp) { int ret; VFS_LOGF("VfsExecve(\"%s\", %p, %p)", pathname, argv, envp); info = NULL; - if (ret = VfsOpen(AT_FDCWD, pathname, O_RDONLY | O_CLOEXEC, 0) == -1) { + if ((ret = VfsOpen(AT_FDCWD, pathname, O_RDONLY | O_CLOEXEC, 0)) == -1) { return -1; } if (VfsFreeFd(ret, &info) == -1) { diff --git a/blink/vfs.h b/blink/vfs.h index 590736316..b9c30fd5f 100644 --- a/blink/vfs.h +++ b/blink/vfs.h @@ -1,8 +1,8 @@ #ifndef BLINK_VFS_H_ #define BLINK_VFS_H_ #include +#include #include -#include #include #include #include @@ -268,159 +268,159 @@ int VfsFreeFd(int, struct VfsInfo **); int VfsSetFd(int, struct VfsInfo *); int VfsPathBuild(struct VfsInfo *info, struct VfsInfo *root, char **output); #elif !defined(DISABLE_OVERLAYS) -#define VfsChown OverlaysChown -#define VfsAccess OverlaysAccess -#define VfsStat OverlaysStat -#define VfsChdir OverlaysChdir -#define VfsGetcwd OverlaysGetcwd -#define VfsMkdir OverlaysMkdir -#define VfsChmod OverlaysChmod -#define VfsReadlink OverlaysReadlink -#define VfsOpen OverlaysOpen -#define VfsSymlink OverlaysSymlink -#define VfsMkfifo OverlaysMkfifo -#define VfsUnlink OverlaysUnlink -#define VfsRename OverlaysRename -#define VfsLink OverlaysLink -#define VfsUtime OverlaysUtime -#define VfsFchown fchown -#define VfsFchdir fchdir -#define VfsFchmod fchmod -#define VfsFutime futimens -#define VfsFstat fstat -#define VfsFtruncate ftruncate -#define VfsClose close -#define VfsRead read -#define VfsWrite write -#define VfsPread pread -#define VfsPwrite pwrite -#define VfsReadv readv -#define VfsWritev writev -#define VfsPreadv preadv -#define VfsPwritev pwritev -#define VfsSeek lseek -#define VfsFsync fsync -#define VfsFdatasync fdatasync -#define VfsFlock flock -#define VfsFcntl fcntl -#define VfsDup dup -#define VfsDup2 dup2 -#define VfsDup3 dup3 -#define VfsPoll poll -#define VfsSelect pselect -#define VfsOpendir fdopendir -#define VfsSeekdir seekdir -#define VfsTelldir telldir -#define VfsReaddir readdir -#define VfsRewinddir rewinddir -#define VfsClosedir closedir -#define VfsPipe2 pipe2 -#define VfsSocket socket -#define VfsSocketpair socketpair -#define VfsBind bind -#define VfsConnect connect -#define VfsAccept accept -#define VfsListen listen -#define VfsShutdown shutdown -#define VfsRecvmsg recvmsg -#define VfsSendmsg sendmsg -#define VfsGetsockopt getsockopt -#define VfsSetsockopt setsockopt -#define VfsGetsockname getsockname -#define VfsGetpeername getpeername -#define VfsIoctl ioctl -#define VfsTcgetattr tcgetattr -#define VfsTcsetattr tcsetattr -#define VfsTcgetpgrp tcgetpgrp -#define VfsTcsetpgrp tcsetpgrp -#define VfsTcgetsid tcgetsid -#define VfsTcsendbreak tcsendbreak -#define VfsTcflow tcflow -#define VfsTcflush tcflush -#define VfsTcdrain tcdrain -#define VfsSockatmark sockatmark -#define VfsExecve execve -#define VfsMmap mmap -#define VfsMunmap munmap -#define VfsMprotect mprotect -#define VfsMsync msync +#define VfsChown OverlaysChown +#define VfsAccess OverlaysAccess +#define VfsStat OverlaysStat +#define VfsChdir OverlaysChdir +#define VfsGetcwd OverlaysGetcwd +#define VfsMkdir OverlaysMkdir +#define VfsChmod OverlaysChmod +#define VfsReadlink OverlaysReadlink +#define VfsOpen OverlaysOpen +#define VfsSymlink OverlaysSymlink +#define VfsMkfifo OverlaysMkfifo +#define VfsUnlink OverlaysUnlink +#define VfsRename OverlaysRename +#define VfsLink OverlaysLink +#define VfsUtime OverlaysUtime +#define VfsFchown fchown +#define VfsFchdir fchdir +#define VfsFchmod fchmod +#define VfsFutime futimens +#define VfsFstat fstat +#define VfsFtruncate ftruncate +#define VfsClose close +#define VfsRead read +#define VfsWrite write +#define VfsPread pread +#define VfsPwrite pwrite +#define VfsReadv readv +#define VfsWritev writev +#define VfsPreadv preadv +#define VfsPwritev pwritev +#define VfsSeek lseek +#define VfsFsync fsync +#define VfsFdatasync fdatasync +#define VfsFlock flock +#define VfsFcntl fcntl +#define VfsDup dup +#define VfsDup2 dup2 +#define VfsDup3 dup3 +#define VfsPoll poll +#define VfsSelect pselect +#define VfsOpendir fdopendir +#define VfsSeekdir seekdir +#define VfsTelldir telldir +#define VfsReaddir readdir +#define VfsRewinddir rewinddir +#define VfsClosedir closedir +#define VfsPipe2 pipe2 +#define VfsSocket socket +#define VfsSocketpair socketpair +#define VfsBind bind +#define VfsConnect connect +#define VfsAccept accept +#define VfsListen listen +#define VfsShutdown shutdown +#define VfsRecvmsg recvmsg +#define VfsSendmsg sendmsg +#define VfsGetsockopt getsockopt +#define VfsSetsockopt setsockopt +#define VfsGetsockname getsockname +#define VfsGetpeername getpeername +#define VfsIoctl ioctl +#define VfsTcgetattr tcgetattr +#define VfsTcsetattr tcsetattr +#define VfsTcgetpgrp tcgetpgrp +#define VfsTcsetpgrp tcsetpgrp +#define VfsTcgetsid tcgetsid +#define VfsTcsendbreak tcsendbreak +#define VfsTcflow tcflow +#define VfsTcflush tcflush +#define VfsTcdrain tcdrain +#define VfsSockatmark sockatmark +#define VfsExecve execve +#define VfsMmap mmap +#define VfsMunmap munmap +#define VfsMprotect mprotect +#define VfsMsync msync #else -#define VfsChown fchownat -#define VfsAccess faccessat -#define VfsStat fstatat -#define VfsChdir chdir -#define VfsGetcwd getcwd -#define VfsMkdir mkdirat -#define VfsChmod fchmodat -#define VfsReadlink readlinkat -#define VfsOpen openat -#define VfsSymlink symlinkat -#define VfsMkfifo mkfifoat -#define VfsUnlink unlinkat -#define VfsRename renameat -#define VfsLink linkat -#define VfsUtime utimensat -#define VfsFchown fchown -#define VfsFchdir fchdir -#define VfsFchmod fchmod -#define VfsFutime futimens -#define VfsFstat fstat -#define VfsFtruncate ftruncate -#define VfsClose close -#define VfsRead read -#define VfsWrite write -#define VfsPread pread -#define VfsPwrite pwrite -#define VfsReadv readv -#define VfsWritev writev -#define VfsPreadv preadv -#define VfsPwritev pwritev -#define VfsSeek lseek -#define VfsFsync fsync -#define VfsFdatasync fdatasync -#define VfsFlock flock -#define VfsFcntl fcntl -#define VfsDup dup -#define VfsDup2 dup2 -#define VfsDup3 dup3 -#define VfsPoll poll -#define VfsSelect pselect -#define VfsOpendir fdopendir -#define VfsSeekdir seekdir -#define VfsTelldir telldir -#define VfsReaddir readdir -#define VfsRewinddir rewinddir -#define VfsClosedir closedir -#define VfsPipe2 pipe2 -#define VfsSocket socket -#define VfsSocketpair socketpair -#define VfsBind bind -#define VfsConnect connect -#define VfsAccept accept -#define VfsListen listen -#define VfsShutdown shutdown -#define VfsRecvmsg recvmsg -#define VfsSendmsg sendmsg -#define VfsGetsockopt getsockopt -#define VfsSetsockopt setsockopt -#define VfsGetsockname getsockname -#define VfsGetpeername getpeername -#define VfsIoctl ioctl -#define VfsTcgetattr tcgetattr -#define VfsTcsetattr tcsetattr -#define VfsTcgetpgrp tcgetpgrp -#define VfsTcsetpgrp tcsetpgrp -#define VfsTcgetsid tcgetsid -#define VfsTcsendbreak tcsendbreak -#define VfsTcflow tcflow -#define VfsTcflush tcflush -#define VfsTcdrain tcdrain -#define VfsSockatmark sockatmark -#define VfsExecve execve -#define VfsMmap mmap -#define VfsMunmap munmap -#define VfsMprotect mprotect -#define VfsMsync msync +#define VfsChown fchownat +#define VfsAccess faccessat +#define VfsStat fstatat +#define VfsChdir chdir +#define VfsGetcwd getcwd +#define VfsMkdir mkdirat +#define VfsChmod fchmodat +#define VfsReadlink readlinkat +#define VfsOpen openat +#define VfsSymlink symlinkat +#define VfsMkfifo mkfifoat +#define VfsUnlink unlinkat +#define VfsRename renameat +#define VfsLink linkat +#define VfsUtime utimensat +#define VfsFchown fchown +#define VfsFchdir fchdir +#define VfsFchmod fchmod +#define VfsFutime futimens +#define VfsFstat fstat +#define VfsFtruncate ftruncate +#define VfsClose close +#define VfsRead read +#define VfsWrite write +#define VfsPread pread +#define VfsPwrite pwrite +#define VfsReadv readv +#define VfsWritev writev +#define VfsPreadv preadv +#define VfsPwritev pwritev +#define VfsSeek lseek +#define VfsFsync fsync +#define VfsFdatasync fdatasync +#define VfsFlock flock +#define VfsFcntl fcntl +#define VfsDup dup +#define VfsDup2 dup2 +#define VfsDup3 dup3 +#define VfsPoll poll +#define VfsSelect pselect +#define VfsOpendir fdopendir +#define VfsSeekdir seekdir +#define VfsTelldir telldir +#define VfsReaddir readdir +#define VfsRewinddir rewinddir +#define VfsClosedir closedir +#define VfsPipe2 pipe2 +#define VfsSocket socket +#define VfsSocketpair socketpair +#define VfsBind bind +#define VfsConnect connect +#define VfsAccept accept +#define VfsListen listen +#define VfsShutdown shutdown +#define VfsRecvmsg recvmsg +#define VfsSendmsg sendmsg +#define VfsGetsockopt getsockopt +#define VfsSetsockopt setsockopt +#define VfsGetsockname getsockname +#define VfsGetpeername getpeername +#define VfsIoctl ioctl +#define VfsTcgetattr tcgetattr +#define VfsTcsetattr tcsetattr +#define VfsTcgetpgrp tcgetpgrp +#define VfsTcsetpgrp tcsetpgrp +#define VfsTcgetsid tcgetsid +#define VfsTcsendbreak tcsendbreak +#define VfsTcflow tcflow +#define VfsTcflush tcflush +#define VfsTcdrain tcdrain +#define VfsSockatmark sockatmark +#define VfsExecve execve +#define VfsMmap mmap +#define VfsMunmap munmap +#define VfsMprotect mprotect +#define VfsMsync msync #endif #define VFS_SYSTEM_ROOT_MOUNT "/SystemRoot"