diff options
author | 2011-07-07 23:46:46 +0000 | |
---|---|---|
committer | 2011-07-07 23:46:46 +0000 | |
commit | 45c335a93317628e2e3fe8b7ced36af7f2aca92a (patch) | |
tree | 55f050d65d1feb9a8e353ae5a43d61ea7b1e5157 | |
parent | Add new syscall entries to support the openat(2) family of functions (diff) | |
download | wireguard-openbsd-45c335a93317628e2e3fe8b7ced36af7f2aca92a.tar.xz wireguard-openbsd-45c335a93317628e2e3fe8b7ced36af7f2aca92a.zip |
sync
-rw-r--r-- | sys/kern/init_sysent.c | 32 | ||||
-rw-r--r-- | sys/kern/syscalls.c | 18 | ||||
-rw-r--r-- | sys/sys/syscall.h | 48 | ||||
-rw-r--r-- | sys/sys/syscallargs.h | 114 |
4 files changed, 203 insertions, 9 deletions
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index ac321d3f55d..1030881af56 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -1,10 +1,10 @@ -/* $OpenBSD: init_sysent.c,v 1.122 2011/07/07 18:31:17 tedu Exp $ */ +/* $OpenBSD: init_sysent.c,v 1.123 2011/07/07 23:46:46 matthew Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.110 2011/07/07 18:30:50 tedu Exp + * created from; OpenBSD: syscalls.master,v 1.111 2011/07/07 23:45:00 matthew Exp */ #include <sys/param.h> @@ -796,5 +796,33 @@ struct sysent sysent[] = { sys_getrtable }, /* 311 = getrtable */ { 4, s(struct sys_getdirentries_args), 0, sys_getdirentries }, /* 312 = getdirentries */ + { 4, s(struct sys_faccessat_args), 0, + sys_faccessat }, /* 313 = faccessat */ + { 4, s(struct sys_fchmodat_args), 0, + sys_fchmodat }, /* 314 = fchmodat */ + { 5, s(struct sys_fchownat_args), 0, + sys_fchownat }, /* 315 = fchownat */ + { 4, s(struct sys_fstatat_args), 0, + sys_fstatat }, /* 316 = fstatat */ + { 5, s(struct sys_linkat_args), 0, + sys_linkat }, /* 317 = linkat */ + { 3, s(struct sys_mkdirat_args), 0, + sys_mkdirat }, /* 318 = mkdirat */ + { 3, s(struct sys_mkfifoat_args), 0, + sys_mkfifoat }, /* 319 = mkfifoat */ + { 4, s(struct sys_mknodat_args), 0, + sys_mknodat }, /* 320 = mknodat */ + { 4, s(struct sys_openat_args), 0, + sys_openat }, /* 321 = openat */ + { 4, s(struct sys_readlinkat_args), 0, + sys_readlinkat }, /* 322 = readlinkat */ + { 4, s(struct sys_renameat_args), 0, + sys_renameat }, /* 323 = renameat */ + { 3, s(struct sys_symlinkat_args), 0, + sys_symlinkat }, /* 324 = symlinkat */ + { 3, s(struct sys_unlinkat_args), 0, + sys_unlinkat }, /* 325 = unlinkat */ + { 4, s(struct sys_utimensat_args), 0, + sys_utimensat }, /* 326 = utimensat */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index ab5f085e11b..9b92618a1b2 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -1,10 +1,10 @@ -/* $OpenBSD: syscalls.c,v 1.123 2011/07/07 18:31:17 tedu Exp $ */ +/* $OpenBSD: syscalls.c,v 1.124 2011/07/07 23:46:46 matthew Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.110 2011/07/07 18:30:50 tedu Exp + * created from; OpenBSD: syscalls.master,v 1.111 2011/07/07 23:45:00 matthew Exp */ char *syscallnames[] = { @@ -407,4 +407,18 @@ char *syscallnames[] = { "setrtable", /* 310 = setrtable */ "getrtable", /* 311 = getrtable */ "getdirentries", /* 312 = getdirentries */ + "faccessat", /* 313 = faccessat */ + "fchmodat", /* 314 = fchmodat */ + "fchownat", /* 315 = fchownat */ + "fstatat", /* 316 = fstatat */ + "linkat", /* 317 = linkat */ + "mkdirat", /* 318 = mkdirat */ + "mkfifoat", /* 319 = mkfifoat */ + "mknodat", /* 320 = mknodat */ + "openat", /* 321 = openat */ + "readlinkat", /* 322 = readlinkat */ + "renameat", /* 323 = renameat */ + "symlinkat", /* 324 = symlinkat */ + "unlinkat", /* 325 = unlinkat */ + "utimensat", /* 326 = utimensat */ }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index b0e1c87f143..6c035a8825e 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -1,10 +1,10 @@ -/* $OpenBSD: syscall.h,v 1.122 2011/07/07 18:31:17 tedu Exp $ */ +/* $OpenBSD: syscall.h,v 1.123 2011/07/07 23:46:46 matthew Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.110 2011/07/07 18:30:50 tedu Exp + * created from; OpenBSD: syscalls.master,v 1.111 2011/07/07 23:45:00 matthew Exp */ /* syscall: "syscall" ret: "int" args: "int" "..." */ @@ -647,4 +647,46 @@ /* syscall: "getdirentries" ret: "int" args: "int" "char *" "int" "off_t *" */ #define SYS_getdirentries 312 -#define SYS_MAXSYSCALL 313 +/* syscall: "faccessat" ret: "int" args: "int" "const char *" "int" "int" */ +#define SYS_faccessat 313 + +/* syscall: "fchmodat" ret: "int" args: "int" "const char *" "mode_t" "int" */ +#define SYS_fchmodat 314 + +/* syscall: "fchownat" ret: "int" args: "int" "const char *" "uid_t" "gid_t" "int" */ +#define SYS_fchownat 315 + +/* syscall: "fstatat" ret: "int" args: "int" "const char *" "struct stat *" "int" */ +#define SYS_fstatat 316 + +/* syscall: "linkat" ret: "int" args: "int" "const char *" "int" "const char *" "int" */ +#define SYS_linkat 317 + +/* syscall: "mkdirat" ret: "int" args: "int" "const char *" "mode_t" */ +#define SYS_mkdirat 318 + +/* syscall: "mkfifoat" ret: "int" args: "int" "const char *" "mode_t" */ +#define SYS_mkfifoat 319 + +/* syscall: "mknodat" ret: "int" args: "int" "const char *" "mode_t" "dev_t" */ +#define SYS_mknodat 320 + +/* syscall: "openat" ret: "int" args: "int" "const char *" "int" "..." */ +#define SYS_openat 321 + +/* syscall: "readlinkat" ret: "ssize_t" args: "int" "const char *" "char *" "size_t" */ +#define SYS_readlinkat 322 + +/* syscall: "renameat" ret: "int" args: "int" "const char *" "int" "const char *" */ +#define SYS_renameat 323 + +/* syscall: "symlinkat" ret: "int" args: "const char *" "int" "const char *" */ +#define SYS_symlinkat 324 + +/* syscall: "unlinkat" ret: "int" args: "int" "const char *" "int" */ +#define SYS_unlinkat 325 + +/* syscall: "utimensat" ret: "int" args: "int" "const char *" "const struct timespec *" "int" */ +#define SYS_utimensat 326 + +#define SYS_MAXSYSCALL 327 diff --git a/sys/sys/syscallargs.h b/sys/sys/syscallargs.h index 6aa4a09dc3f..2f5cee01ee5 100644 --- a/sys/sys/syscallargs.h +++ b/sys/sys/syscallargs.h @@ -1,10 +1,10 @@ -/* $OpenBSD: syscallargs.h,v 1.124 2011/07/07 18:31:17 tedu Exp $ */ +/* $OpenBSD: syscallargs.h,v 1.125 2011/07/07 23:46:46 matthew Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from; OpenBSD: syscalls.master,v 1.110 2011/07/07 18:30:50 tedu Exp + * created from; OpenBSD: syscalls.master,v 1.111 2011/07/07 23:45:00 matthew Exp */ #ifdef syscallarg @@ -1016,6 +1016,102 @@ struct sys_getdirentries_args { syscallarg(off_t *) basep; }; +struct sys_faccessat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) amode; + syscallarg(int) flag; +}; + +struct sys_fchmodat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(mode_t) mode; + syscallarg(int) flag; +}; + +struct sys_fchownat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(uid_t) uid; + syscallarg(gid_t) gid; + syscallarg(int) flag; +}; + +struct sys_fstatat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(struct stat *) buf; + syscallarg(int) flag; +}; + +struct sys_linkat_args { + syscallarg(int) fd1; + syscallarg(const char *) path1; + syscallarg(int) fd2; + syscallarg(const char *) path2; + syscallarg(int) flag; +}; + +struct sys_mkdirat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(mode_t) mode; +}; + +struct sys_mkfifoat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(mode_t) mode; +}; + +struct sys_mknodat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(mode_t) mode; + syscallarg(dev_t) dev; +}; + +struct sys_openat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) flags; + syscallarg(mode_t) mode; +}; + +struct sys_readlinkat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(char *) buf; + syscallarg(size_t) count; +}; + +struct sys_renameat_args { + syscallarg(int) fromfd; + syscallarg(const char *) from; + syscallarg(int) tofd; + syscallarg(const char *) to; +}; + +struct sys_symlinkat_args { + syscallarg(const char *) path; + syscallarg(int) fd; + syscallarg(const char *) link; +}; + +struct sys_unlinkat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(int) flag; +}; + +struct sys_utimensat_args { + syscallarg(int) fd; + syscallarg(const char *) path; + syscallarg(const struct timespec *) times; + syscallarg(int) flag; +}; + /* * System call prototypes. */ @@ -1278,3 +1374,17 @@ int sys_fhstatfs(struct proc *, void *, register_t *); int sys_setrtable(struct proc *, void *, register_t *); int sys_getrtable(struct proc *, void *, register_t *); int sys_getdirentries(struct proc *, void *, register_t *); +int sys_faccessat(struct proc *, void *, register_t *); +int sys_fchmodat(struct proc *, void *, register_t *); +int sys_fchownat(struct proc *, void *, register_t *); +int sys_fstatat(struct proc *, void *, register_t *); +int sys_linkat(struct proc *, void *, register_t *); +int sys_mkdirat(struct proc *, void *, register_t *); +int sys_mkfifoat(struct proc *, void *, register_t *); +int sys_mknodat(struct proc *, void *, register_t *); +int sys_openat(struct proc *, void *, register_t *); +int sys_readlinkat(struct proc *, void *, register_t *); +int sys_renameat(struct proc *, void *, register_t *); +int sys_symlinkat(struct proc *, void *, register_t *); +int sys_unlinkat(struct proc *, void *, register_t *); +int sys_utimensat(struct proc *, void *, register_t *); |