diff options
author | sobomax <sobomax@FreeBSD.org> | 2003-11-16 15:07:10 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2003-11-16 15:07:10 +0000 |
commit | a621621dc908dd3a638c875c5bd8b949bf04326e (patch) | |
tree | c21807928bf314bd714743294f74013149b906a8 /sys/i386/linux | |
parent | b1926e392ed0eee6eba473c1a39c291a5f097794 (diff) | |
download | FreeBSD-src-a621621dc908dd3a638c875c5bd8b949bf04326e.zip FreeBSD-src-a621621dc908dd3a638c875c5bd8b949bf04326e.tar.gz |
Pull latest changes from OpenBSD:
- improve sysinfo(2) syscall;
- add dummy fadvise64(2) syscall;
- add dummy *xattr(2) family of syscalls;
- add protos for the syscalls 222-225, 238-249 and 253-267;
- add exit_group(2) syscall, which is currently just wired to exit(2).
Obtained from: OpenBSD
MFC after: 2 weeks
Diffstat (limited to 'sys/i386/linux')
-rw-r--r-- | sys/i386/linux/linux_dummy.c | 22 | ||||
-rw-r--r-- | sys/i386/linux/linux_proto.h | 52 | ||||
-rw-r--r-- | sys/i386/linux/linux_syscall.h | 16 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysent.c | 46 | ||||
-rw-r--r-- | sys/i386/linux/syscalls.master | 46 |
5 files changed, 181 insertions, 1 deletions
diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index 93efa80..67d1b88 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -70,3 +70,25 @@ DUMMY(setfsgid); DUMMY(pivot_root); DUMMY(mincore); DUMMY(madvise); +DUMMY(fadvise64); + +#define DUMMY_XATTR(s) \ +int \ +linux_ ## s ## xattr( \ + struct thread *td, struct linux_ ## s ## xattr_args *arg) \ +{ \ + \ + return (ENOATTR); \ +} +DUMMY_XATTR(set); +DUMMY_XATTR(lset); +DUMMY_XATTR(fset); +DUMMY_XATTR(get); +DUMMY_XATTR(lget); +DUMMY_XATTR(fget); +DUMMY_XATTR(list); +DUMMY_XATTR(llist); +DUMMY_XATTR(flist); +DUMMY_XATTR(remove); +DUMMY_XATTR(lremove); +DUMMY_XATTR(fremove); diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 66b95f4..4897301 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -644,6 +644,45 @@ struct linux_fcntl64_args { char cmd_l_[PADL_(l_uint)]; l_uint cmd; char cmd_r_[PADR_(l_uint)]; char arg_l_[PADL_(l_ulong)]; l_ulong arg; char arg_r_[PADR_(l_ulong)]; }; +struct linux_setxattr_args { + register_t dummy; +}; +struct linux_lsetxattr_args { + register_t dummy; +}; +struct linux_fsetxattr_args { + register_t dummy; +}; +struct linux_getxattr_args { + register_t dummy; +}; +struct linux_lgetxattr_args { + register_t dummy; +}; +struct linux_fgetxattr_args { + register_t dummy; +}; +struct linux_listxattr_args { + register_t dummy; +}; +struct linux_llistxattr_args { + register_t dummy; +}; +struct linux_flistxattr_args { + register_t dummy; +}; +struct linux_removexattr_args { + register_t dummy; +}; +struct linux_lremovexattr_args { + register_t dummy; +}; +struct linux_fremovexattr_args { + register_t dummy; +}; +struct linux_fadvise64_args { + register_t dummy; +}; int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_waitpid(struct thread *, struct linux_waitpid_args *); @@ -797,6 +836,19 @@ int linux_mincore(struct thread *, struct linux_mincore_args *); int linux_madvise(struct thread *, struct linux_madvise_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_fcntl64(struct thread *, struct linux_fcntl64_args *); +int linux_setxattr(struct thread *, struct linux_setxattr_args *); +int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); +int linux_fsetxattr(struct thread *, struct linux_fsetxattr_args *); +int linux_getxattr(struct thread *, struct linux_getxattr_args *); +int linux_lgetxattr(struct thread *, struct linux_lgetxattr_args *); +int linux_fgetxattr(struct thread *, struct linux_fgetxattr_args *); +int linux_listxattr(struct thread *, struct linux_listxattr_args *); +int linux_llistxattr(struct thread *, struct linux_llistxattr_args *); +int linux_flistxattr(struct thread *, struct linux_flistxattr_args *); +int linux_removexattr(struct thread *, struct linux_removexattr_args *); +int linux_lremovexattr(struct thread *, struct linux_lremovexattr_args *); +int linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *); +int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); #ifdef COMPAT_43 diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 0fb3e8e..fc4592d 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -213,4 +213,18 @@ #define LINUX_SYS_linux_madvise 219 #define LINUX_SYS_linux_getdents64 220 #define LINUX_SYS_linux_fcntl64 221 -#define LINUX_SYS_MAXSYSCALL 222 +#define LINUX_SYS_linux_setxattr 226 +#define LINUX_SYS_linux_lsetxattr 227 +#define LINUX_SYS_linux_fsetxattr 228 +#define LINUX_SYS_linux_getxattr 229 +#define LINUX_SYS_linux_lgetxattr 230 +#define LINUX_SYS_linux_fgetxattr 231 +#define LINUX_SYS_linux_listxattr 232 +#define LINUX_SYS_linux_llistxattr 233 +#define LINUX_SYS_linux_flistxattr 234 +#define LINUX_SYS_linux_removexattr 235 +#define LINUX_SYS_linux_lremovexattr 236 +#define LINUX_SYS_linux_fremovexattr 237 +#define LINUX_SYS_linux_fadvise64 250 +#define LINUX_SYS_exit_group 252 +#define LINUX_SYS_MAXSYSCALL 268 diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index ca829cb..cd70b7f 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -239,4 +239,50 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */ { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */ { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ + { 0, (sy_call_t *)nosys }, /* 222 = */ + { 0, (sy_call_t *)nosys }, /* 223 = */ + { 0, (sy_call_t *)nosys }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)nosys }, /* 225 = linux_readahead */ + { 0, (sy_call_t *)linux_setxattr }, /* 226 = linux_setxattr */ + { 0, (sy_call_t *)linux_lsetxattr }, /* 227 = linux_lsetxattr */ + { 0, (sy_call_t *)linux_fsetxattr }, /* 228 = linux_fsetxattr */ + { 0, (sy_call_t *)linux_getxattr }, /* 229 = linux_getxattr */ + { 0, (sy_call_t *)linux_lgetxattr }, /* 230 = linux_lgetxattr */ + { 0, (sy_call_t *)linux_fgetxattr }, /* 231 = linux_fgetxattr */ + { 0, (sy_call_t *)linux_listxattr }, /* 232 = linux_listxattr */ + { 0, (sy_call_t *)linux_llistxattr }, /* 233 = linux_llistxattr */ + { 0, (sy_call_t *)linux_flistxattr }, /* 234 = linux_flistxattr */ + { 0, (sy_call_t *)linux_removexattr }, /* 235 = linux_removexattr */ + { 0, (sy_call_t *)linux_lremovexattr }, /* 236 = linux_lremovexattr */ + { 0, (sy_call_t *)linux_fremovexattr }, /* 237 = linux_fremovexattr */ + { 0, (sy_call_t *)nosys }, /* 238 = linux_tkill */ + { 0, (sy_call_t *)nosys }, /* 239 = linux_sendfile64 */ + { 0, (sy_call_t *)nosys }, /* 240 = linux_futex */ + { 0, (sy_call_t *)nosys }, /* 241 = linux_sched_setaffinity */ + { 0, (sy_call_t *)nosys }, /* 242 = linux_sched_getaffinity */ + { 0, (sy_call_t *)nosys }, /* 243 = linux_set_thread_area */ + { 0, (sy_call_t *)nosys }, /* 244 = linux_get_thread_area */ + { 0, (sy_call_t *)nosys }, /* 245 = linux_io_setup */ + { 0, (sy_call_t *)nosys }, /* 246 = linux_io_destroy */ + { 0, (sy_call_t *)nosys }, /* 247 = linux_io_getevents */ + { 0, (sy_call_t *)nosys }, /* 248 = linux_io_submit */ + { 0, (sy_call_t *)nosys }, /* 249 = linux_io_cancel */ + { 0, (sy_call_t *)linux_fadvise64 }, /* 250 = linux_fadvise64 */ + { 0, (sy_call_t *)nosys }, /* 251 = */ + { SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 252 = exit_group */ + { 0, (sy_call_t *)nosys }, /* 253 = linux_lookup_dcookie */ + { 0, (sy_call_t *)nosys }, /* 254 = linux_epoll_create */ + { 0, (sy_call_t *)nosys }, /* 255 = linux_epoll_ctl */ + { 0, (sy_call_t *)nosys }, /* 256 = linux_epoll_wait */ + { 0, (sy_call_t *)nosys }, /* 257 = linux_remap_file_pages */ + { 0, (sy_call_t *)nosys }, /* 258 = linux_set_tid_address */ + { 0, (sy_call_t *)nosys }, /* 259 = linux_timer_create */ + { 0, (sy_call_t *)nosys }, /* 260 = linux_timer_settime */ + { 0, (sy_call_t *)nosys }, /* 261 = linux_timer_gettime */ + { 0, (sy_call_t *)nosys }, /* 262 = linux_timer_getoverrun */ + { 0, (sy_call_t *)nosys }, /* 263 = linux_timer_delete */ + { 0, (sy_call_t *)nosys }, /* 264 = linux_clock_settime */ + { 0, (sy_call_t *)nosys }, /* 265 = linux_clock_gettime */ + { 0, (sy_call_t *)nosys }, /* 266 = linux_clock_getres */ + { 0, (sy_call_t *)nosys }, /* 267 = linux_clock_nanosleep */ }; diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 9e3d5c5..4294056 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -338,3 +338,49 @@ l_uint count); } 221 STD LINUX { int linux_fcntl64(l_uint fd, l_uint cmd, \ l_ulong arg); } +222 UNIMPL +223 UNIMPL +224 UNIMPL LINUX linux_gettid +225 UNIMPL LINUX linux_readahead +226 STD LINUX { int linux_setxattr(void); } +227 STD LINUX { int linux_lsetxattr(void); } +228 STD LINUX { int linux_fsetxattr(void); } +229 STD LINUX { int linux_getxattr(void); } +230 STD LINUX { int linux_lgetxattr(void); } +231 STD LINUX { int linux_fgetxattr(void); } +232 STD LINUX { int linux_listxattr(void); } +233 STD LINUX { int linux_llistxattr(void); } +234 STD LINUX { int linux_flistxattr(void); } +235 STD LINUX { int linux_removexattr(void); } +236 STD LINUX { int linux_lremovexattr(void); } +237 STD LINUX { int linux_fremovexattr(void); } +238 UNIMPL LINUX linux_tkill +239 UNIMPL LINUX linux_sendfile64 +240 UNIMPL LINUX linux_futex +241 UNIMPL LINUX linux_sched_setaffinity +242 UNIMPL LINUX linux_sched_getaffinity +243 UNIMPL LINUX linux_set_thread_area +244 UNIMPL LINUX linux_get_thread_area +245 UNIMPL LINUX linux_io_setup +246 UNIMPL LINUX linux_io_destroy +247 UNIMPL LINUX linux_io_getevents +248 UNIMPL LINUX linux_io_submit +249 UNIMPL LINUX linux_io_cancel +250 STD LINUX { int linux_fadvise64(void); } +251 UNIMPL +252 MNOPROTO LINUX { void sys_exit(int rval); } exit_group sys_exit_args void +253 UNIMPL LINUX linux_lookup_dcookie +254 UNIMPL LINUX linux_epoll_create +255 UNIMPL LINUX linux_epoll_ctl +256 UNIMPL LINUX linux_epoll_wait +257 UNIMPL LINUX linux_remap_file_pages +258 UNIMPL LINUX linux_set_tid_address +259 UNIMPL LINUX linux_timer_create +260 UNIMPL LINUX linux_timer_settime +261 UNIMPL LINUX linux_timer_gettime +262 UNIMPL LINUX linux_timer_getoverrun +263 UNIMPL LINUX linux_timer_delete +264 UNIMPL LINUX linux_clock_settime +265 UNIMPL LINUX linux_clock_gettime +266 UNIMPL LINUX linux_clock_getres +267 UNIMPL LINUX linux_clock_nanosleep |