git: 89d270b28def - main - Regen for write syscall
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Aug 2023 07:37:44 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=89d270b28def13957db730224435f8a6190589b9 commit 89d270b28def13957db730224435f8a6190589b9 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-08-20 07:36:29 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-08-20 07:36:29 +0000 Regen for write syscall --- sys/amd64/linux/linux_proto.h | 7 +++++++ sys/amd64/linux/linux_syscall.h | 2 +- sys/amd64/linux/linux_syscalls.c | 2 +- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 8 ++++---- sys/amd64/linux32/linux32_proto.h | 7 +++++++ sys/amd64/linux32/linux32_syscall.h | 2 +- sys/amd64/linux32/linux32_syscalls.c | 2 +- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 12 ++++++------ sys/arm64/linux/linux_proto.h | 7 +++++++ sys/arm64/linux/linux_syscall.h | 2 +- sys/arm64/linux/linux_syscalls.c | 2 +- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 8 ++++---- sys/i386/linux/linux_proto.h | 7 +++++++ sys/i386/linux/linux_syscall.h | 2 +- sys/i386/linux/linux_syscalls.c | 2 +- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 12 ++++++------ 20 files changed, 60 insertions(+), 32 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 84d3b04de1a4..80b5998e2f26 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -34,6 +34,11 @@ struct thread; #endif #define nosys linux_nosys +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)]; +}; struct linux_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1396,6 +1401,7 @@ struct linux_mount_setattr_args { syscallarg_t dummy; }; #define nosys linux_nosys +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_newstat(struct thread *, struct linux_newstat_args *); int linux_newfstat(struct thread *, struct linux_newfstat_args *); @@ -1693,6 +1699,7 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +#define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_newstat AUE_STAT #define LINUX_SYS_AUE_linux_newfstat AUE_FSTAT diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index 690f402ef2d0..45ba487f3a93 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -5,7 +5,7 @@ */ #define LINUX_SYS_read 0 -#define LINUX_SYS_write 1 +#define LINUX_SYS_linux_write 1 #define LINUX_SYS_linux_open 2 #define LINUX_SYS_close 3 #define LINUX_SYS_linux_newstat 4 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 04131a05c0db..57f65a0a6cbf 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -7,7 +7,7 @@ const char *linux_syscallnames[] = { #define nosys linux_nosys "read", /* 0 = read */ - "write", /* 1 = write */ + "linux_write", /* 1 = linux_write */ "linux_open", /* 2 = linux_open */ "close", /* 3 = close */ "linux_newstat", /* 4 = linux_newstat */ diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index c2550aec6831..79557b3780b3 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -17,7 +17,7 @@ struct sysent linux_sysent[] = { #define nosys linux_nosys { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 0 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = write */ + { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = close */ { .sy_narg = AS(linux_newstat_args), .sy_call = (sy_call_t *)linux_newstat, .sy_auevent = AUE_STAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_newstat */ diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 45e4cce95095..5edef91239d3 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -21,9 +21,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 1: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ iarg[a++] = p->nbyte; /* l_size_t */ @@ -2778,7 +2778,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 1: switch (ndx) { case 0: @@ -7198,7 +7198,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 1: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index e0d52b2675d6..4934b22c1ca1 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -40,6 +40,11 @@ struct linux_exit_args { struct linux_fork_args { syscallarg_t dummy; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)]; +}; struct linux_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1704,6 +1709,7 @@ struct linux_mount_setattr_args { #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_waitpid(struct thread *, struct linux_waitpid_args *); int linux_creat(struct thread *, struct linux_creat_args *); @@ -2067,6 +2073,7 @@ int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK +#define LINUX32_SYS_AUE_linux_write AUE_NULL #define LINUX32_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX32_SYS_AUE_linux_waitpid AUE_WAIT4 #define LINUX32_SYS_AUE_linux_creat AUE_CREAT diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index 6fab4cb61bb3..e24080e3c2e7 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -7,7 +7,7 @@ #define LINUX32_SYS_linux_exit 1 #define LINUX32_SYS_linux_fork 2 #define LINUX32_SYS_read 3 -#define LINUX32_SYS_write 4 +#define LINUX32_SYS_linux_write 4 #define LINUX32_SYS_linux_open 5 #define LINUX32_SYS_close 6 #define LINUX32_SYS_linux_waitpid 7 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index 6706189b7036..cdeda60a1577 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -10,7 +10,7 @@ const char *linux32_syscallnames[] = { "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ "read", /* 3 = read */ - "write", /* 4 = write */ + "linux_write", /* 4 = linux_write */ "linux_open", /* 5 = linux_open */ "close", /* 6 = close */ "linux_waitpid", /* 7 = linux_waitpid */ diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index f005ffb9ea54..b5513743bbee 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -20,7 +20,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ + { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 6 = close */ { .sy_narg = AS(linux_waitpid_args), .sy_call = (sy_call_t *)linux_waitpid, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = linux_waitpid */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index ba1c2c01852c..82736cb221bf 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -33,12 +33,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 4: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ - uarg[a++] = p->nbyte; /* u_int */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -3305,7 +3305,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 4: switch (ndx) { case 0: @@ -3315,7 +3315,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -8584,7 +8584,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 4: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 34108364f751..f239bcb1463b 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -270,6 +270,11 @@ struct linux_lseek_args { char off_l_[PADL_(l_off_t)]; l_off_t off; char off_r_[PADR_(l_off_t)]; char whence_l_[PADL_(l_int)]; l_int whence; char whence_r_[PADR_(l_int)]; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)]; +}; struct linux_pread_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; @@ -1254,6 +1259,7 @@ int linux_vhangup(struct thread *, struct linux_vhangup_args *); int linux_pipe2(struct thread *, struct linux_pipe2_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_lseek(struct thread *, struct linux_lseek_args *); +int linux_write(struct thread *, struct linux_write_args *); int linux_pread(struct thread *, struct linux_pread_args *); int linux_pwrite(struct thread *, struct linux_pwrite_args *); int linux_preadv(struct thread *, struct linux_preadv_args *); @@ -1502,6 +1508,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_pipe2 AUE_NULL #define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_lseek AUE_LSEEK +#define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_pread AUE_PREAD #define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE #define LINUX_SYS_AUE_linux_preadv AUE_NULL diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index fe44c5c87e81..3307005a74c0 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -60,7 +60,7 @@ #define LINUX_SYS_linux_getdents64 61 #define LINUX_SYS_linux_lseek 62 #define LINUX_SYS_read 63 -#define LINUX_SYS_write 64 +#define LINUX_SYS_linux_write 64 #define LINUX_SYS_readv 65 #define LINUX_SYS_writev 66 #define LINUX_SYS_linux_pread 67 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index d1762a9166f6..86b3c012c0b2 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -70,7 +70,7 @@ const char *linux_syscallnames[] = { "linux_getdents64", /* 61 = linux_getdents64 */ "linux_lseek", /* 62 = linux_lseek */ "read", /* 63 = read */ - "write", /* 64 = write */ + "linux_write", /* 64 = linux_write */ "readv", /* 65 = readv */ "writev", /* 66 = writev */ "linux_pread", /* 67 = linux_pread */ diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 00f4f2f2f735..940391dd175e 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -80,7 +80,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_getdents64_args), .sy_call = (sy_call_t *)linux_getdents64, .sy_auevent = AUE_GETDIRENTRIES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 61 = linux_getdents64 */ { .sy_narg = AS(linux_lseek_args), .sy_call = (sy_call_t *)linux_lseek, .sy_auevent = AUE_LSEEK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 62 = linux_lseek */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 63 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 64 = write */ + { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 64 = linux_write */ { .sy_narg = AS(readv_args), .sy_call = (sy_call_t *)sys_readv, .sy_auevent = AUE_READV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 65 = readv */ { .sy_narg = AS(writev_args), .sy_call = (sy_call_t *)sys_writev, .sy_auevent = AUE_WRITEV, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = writev */ { .sy_narg = AS(linux_pread_args), .sy_call = (sy_call_t *)linux_pread, .sy_auevent = AUE_PREAD, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 67 = linux_pread */ diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index b45fbcf746f4..06f973cebe37 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -492,9 +492,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 64: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ iarg[a++] = p->nbyte; /* l_size_t */ @@ -3203,7 +3203,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 64: switch (ndx) { case 0: @@ -6533,7 +6533,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 64: if (ndx == 0 || ndx == 1) p = "int"; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 5ed3630599c6..5b58629d7b92 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -40,6 +40,11 @@ struct linux_exit_args { struct linux_fork_args { syscallarg_t dummy; }; +struct linux_write_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char nbyte_l_[PADL_(l_size_t)]; l_size_t nbyte; char nbyte_r_[PADR_(l_size_t)]; +}; struct linux_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; @@ -1693,6 +1698,7 @@ struct linux_mount_setattr_args { #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); +int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); int linux_waitpid(struct thread *, struct linux_waitpid_args *); int linux_creat(struct thread *, struct linux_creat_args *); @@ -2057,6 +2063,7 @@ int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK +#define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 #define LINUX_SYS_AUE_linux_creat AUE_CREAT diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 5aca8ed78c6f..aafcd849634f 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -7,7 +7,7 @@ #define LINUX_SYS_linux_exit 1 #define LINUX_SYS_linux_fork 2 #define LINUX_SYS_read 3 -#define LINUX_SYS_write 4 +#define LINUX_SYS_linux_write 4 #define LINUX_SYS_linux_open 5 #define LINUX_SYS_close 6 #define LINUX_SYS_linux_waitpid 7 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 88ebcbd36073..b6076e9115c2 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -10,7 +10,7 @@ const char *linux_syscallnames[] = { "linux_exit", /* 1 = linux_exit */ "linux_fork", /* 2 = linux_fork */ "read", /* 3 = read */ - "write", /* 4 = write */ + "linux_write", /* 4 = linux_write */ "linux_open", /* 5 = linux_open */ "close", /* 6 = close */ "linux_waitpid", /* 7 = linux_waitpid */ diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index d08b8458740a..be84f04ac9be 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -20,7 +20,7 @@ struct sysent linux_sysent[] = { { .sy_narg = AS(linux_exit_args), .sy_call = (sy_call_t *)linux_exit, .sy_auevent = AUE_EXIT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 1 = linux_exit */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fork, .sy_auevent = AUE_FORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 2 = linux_fork */ { .sy_narg = AS(read_args), .sy_call = (sy_call_t *)sys_read, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 3 = read */ - { .sy_narg = AS(write_args), .sy_call = (sy_call_t *)sys_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = write */ + { .sy_narg = AS(linux_write_args), .sy_call = (sy_call_t *)linux_write, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 4 = linux_write */ { .sy_narg = AS(linux_open_args), .sy_call = (sy_call_t *)linux_open, .sy_auevent = AUE_OPEN_RWTC, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 5 = linux_open */ { .sy_narg = AS(close_args), .sy_call = (sy_call_t *)sys_close, .sy_auevent = AUE_CLOSE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 6 = close */ { .sy_narg = AS(linux_waitpid_args), .sy_call = (sy_call_t *)linux_waitpid, .sy_auevent = AUE_WAIT4, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 7 = linux_waitpid */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 20098469d72e..b6470cb66583 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -33,12 +33,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* write */ + /* linux_write */ case 4: { - struct write_args *p = params; + struct linux_write_args *p = params; iarg[a++] = p->fd; /* int */ uarg[a++] = (intptr_t)p->buf; /* char * */ - uarg[a++] = p->nbyte; /* u_int */ + iarg[a++] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -3336,7 +3336,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* write */ + /* linux_write */ case 4: switch (ndx) { case 0: @@ -3346,7 +3346,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -8640,7 +8640,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* write */ + /* linux_write */ case 4: if (ndx == 0 || ndx == 1) p = "int";