version 1.109.2.1, 2014/12/09 20:13:38 |
version 1.109.2.2, 2016/03/03 14:30:52 |
|
|
DUALCALL_LINK, DUALCALL_RENAME, |
DUALCALL_LINK, DUALCALL_RENAME, |
DUALCALL_MKDIR, DUALCALL_RMDIR, |
DUALCALL_MKDIR, DUALCALL_RMDIR, |
DUALCALL_UTIMES, DUALCALL_LUTIMES, DUALCALL_FUTIMES, |
DUALCALL_UTIMES, DUALCALL_LUTIMES, DUALCALL_FUTIMES, |
|
DUALCALL_UTIMENSAT, DUALCALL_FUTIMENS, |
DUALCALL_TRUNCATE, DUALCALL_FTRUNCATE, |
DUALCALL_TRUNCATE, DUALCALL_FTRUNCATE, |
DUALCALL_FSYNC, |
DUALCALL_FSYNC, |
DUALCALL_ACCESS, |
DUALCALL_ACCESS, |
Line 304 struct sysnames { |
|
Line 305 struct sysnames { |
|
{ DUALCALL_UTIMES, S(REALUTIMES), RSYS_NAME(UTIMES) }, |
{ DUALCALL_UTIMES, S(REALUTIMES), RSYS_NAME(UTIMES) }, |
{ DUALCALL_LUTIMES, S(REALLUTIMES), RSYS_NAME(LUTIMES) }, |
{ DUALCALL_LUTIMES, S(REALLUTIMES), RSYS_NAME(LUTIMES) }, |
{ DUALCALL_FUTIMES, S(REALFUTIMES), RSYS_NAME(FUTIMES) }, |
{ DUALCALL_FUTIMES, S(REALFUTIMES), RSYS_NAME(FUTIMES) }, |
|
{ DUALCALL_UTIMENSAT, "utimensat", RSYS_NAME(UTIMENSAT) }, |
|
{ DUALCALL_FUTIMENS, "futimens", RSYS_NAME(FUTIMENS) }, |
{ DUALCALL_OPEN, "open", RSYS_NAME(OPEN) }, |
{ DUALCALL_OPEN, "open", RSYS_NAME(OPEN) }, |
{ DUALCALL_CHDIR, "chdir", RSYS_NAME(CHDIR) }, |
{ DUALCALL_CHDIR, "chdir", RSYS_NAME(CHDIR) }, |
{ DUALCALL_FCHDIR, "fchdir", RSYS_NAME(FCHDIR) }, |
{ DUALCALL_FCHDIR, "fchdir", RSYS_NAME(FCHDIR) }, |
Line 525 whichpath(const char *path) |
|
Line 528 whichpath(const char *path) |
|
#define DPRINTF(x) |
#define DPRINTF(x) |
#endif |
#endif |
|
|
|
#define ATCALL(type, name, rcname, args, proto, vars) \ |
|
type name args \ |
|
{ \ |
|
type (*fun) proto; \ |
|
int isrump = -1; \ |
|
\ |
|
if (fd == AT_FDCWD || *path == '/') { \ |
|
isrump = path_isrump(path); \ |
|
} else { \ |
|
isrump = fd_isrump(fd); \ |
|
} \ |
|
\ |
|
DPRINTF(("%s -> %d:%s (%s)\n", __STRING(name), \ |
|
fd, path, isrump ? "rump" : "host")); \ |
|
\ |
|
assert(isrump != -1); \ |
|
if (isrump) { \ |
|
fun = syscalls[rcname].bs_rump; \ |
|
if (fd != AT_FDCWD) \ |
|
fd = fd_host2rump(fd); \ |
|
path = path_host2rump(path); \ |
|
} else { \ |
|
fun = syscalls[rcname].bs_host; \ |
|
} \ |
|
return fun vars; \ |
|
} |
|
|
#define FDCALL(type, name, rcname, args, proto, vars) \ |
#define FDCALL(type, name, rcname, args, proto, vars) \ |
type name args \ |
type name args \ |
{ \ |
{ \ |
Line 2238 __sysctl(const int *name, unsigned int n |
|
Line 2268 __sysctl(const int *name, unsigned int n |
|
* Rest are std type calls. |
* Rest are std type calls. |
*/ |
*/ |
|
|
|
ATCALL(int, utimensat, DUALCALL_UTIMENSAT, \ |
|
(int fd, const char *path, const struct timespec t[2], int f), \ |
|
(int, const char *, const struct timespec [2], int), |
|
(fd, path, t, f)) |
|
|
FDCALL(int, bind, DUALCALL_BIND, \ |
FDCALL(int, bind, DUALCALL_BIND, \ |
(int fd, const struct sockaddr *name, socklen_t namelen), \ |
(int fd, const struct sockaddr *name, socklen_t namelen), \ |
(int, const struct sockaddr *, socklen_t), \ |
(int, const struct sockaddr *, socklen_t), \ |