freebsd32: remove redundant no-arg syscalls
pipe requires no special handling.
ofreebsd32_sigpending did differ from osigpending in that it acted
on the siglist rather than the sigqueue, but this appears to be an
oversight in 3fbdb3c215
.
ogetpagesize could theoretically have ABI-dependent results, but in
practice does not. If it does it would be easy handle in the central
implementation and be the least of the problems in changing the value of
PAGE_SIZE.
Reviewed by: kevans
This commit is contained in:
parent
5b5a48c787
commit
ad58266704
@ -69,14 +69,3 @@ freebsd32_sysarch(struct thread *td, struct freebsd32_sysarch_args *uap)
|
||||
return (sysarch(td, &uap1));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
int
|
||||
ofreebsd32_getpagesize(struct thread *td,
|
||||
struct ofreebsd32_getpagesize_args *uap)
|
||||
{
|
||||
|
||||
td->td_retval[0] = IA32_PAGE_SIZE;
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
@ -411,20 +411,6 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
/*
|
||||
* COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is defined.
|
||||
* FreeBSD/arm provies a similar getpagesize() syscall.
|
||||
*/
|
||||
#define ARM32_PAGE_SIZE 4096
|
||||
int
|
||||
ofreebsd32_getpagesize(struct thread *td,
|
||||
struct ofreebsd32_getpagesize_args *uap)
|
||||
{
|
||||
|
||||
td->td_retval[0] = ARM32_PAGE_SIZE;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mirror the osigreturn definition in kern_sig.c for !i386 platforms. This
|
||||
* mirrors what's connected to the FreeBSD/arm syscall.
|
||||
|
@ -320,14 +320,6 @@ freebsd4_freebsd32_getfsstat(struct thread *td,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_FREEBSD10
|
||||
int
|
||||
freebsd10_freebsd32_pipe(struct thread *td,
|
||||
struct freebsd10_freebsd32_pipe_args *uap) {
|
||||
return (freebsd10_pipe(td, (struct freebsd10_pipe_args*)uap));
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
freebsd32_sigaltstack(struct thread *td,
|
||||
struct freebsd32_sigaltstack_args *uap)
|
||||
@ -2740,21 +2732,6 @@ ofreebsd32_sigprocmask(struct thread *td,
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
ofreebsd32_sigpending(struct thread *td,
|
||||
struct ofreebsd32_sigpending_args *uap)
|
||||
{
|
||||
struct proc *p = td->td_proc;
|
||||
sigset_t siglist;
|
||||
|
||||
PROC_LOCK(p);
|
||||
siglist = p->p_siglist;
|
||||
SIGSETOR(siglist, td->td_siglist);
|
||||
PROC_UNLOCK(p);
|
||||
SIG2OSIG(siglist, td->td_retval[0]);
|
||||
return (0);
|
||||
}
|
||||
|
||||
struct sigvec32 {
|
||||
u_int32_t sv_handler;
|
||||
int sv_mask;
|
||||
|
@ -67,12 +67,6 @@ struct freebsd32_recvfrom_args {
|
||||
char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)];
|
||||
char fromlenaddr_l_[PADL_(uint32_t)]; uint32_t fromlenaddr; char fromlenaddr_r_[PADR_(uint32_t)];
|
||||
};
|
||||
struct freebsd10_freebsd32_pipe_args {
|
||||
register_t dummy;
|
||||
};
|
||||
struct ofreebsd32_sigpending_args {
|
||||
register_t dummy;
|
||||
};
|
||||
struct freebsd32_sigaltstack_args {
|
||||
char ss_l_[PADL_(const struct sigaltstack32 *)]; const struct sigaltstack32 * ss; char ss_r_[PADR_(const struct sigaltstack32 *)];
|
||||
char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)];
|
||||
@ -933,9 +927,6 @@ struct ofreebsd32_fstat_args {
|
||||
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
|
||||
char sb_l_[PADL_(struct ostat32 *)]; struct ostat32 * sb; char sb_r_[PADR_(struct ostat32 *)];
|
||||
};
|
||||
struct ofreebsd32_getpagesize_args {
|
||||
char dummy_l_[PADL_(int32_t)]; int32_t dummy; char dummy_r_[PADR_(int32_t)];
|
||||
};
|
||||
struct ofreebsd32_mmap_args {
|
||||
char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
|
||||
char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)];
|
||||
@ -991,9 +982,7 @@ int ofreebsd32_stat(struct thread *, struct ofreebsd32_stat_args *);
|
||||
int ofreebsd32_lstat(struct thread *, struct ofreebsd32_lstat_args *);
|
||||
int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *);
|
||||
int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *);
|
||||
int ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *);
|
||||
int ofreebsd32_fstat(struct thread *, struct ofreebsd32_fstat_args *);
|
||||
int ofreebsd32_getpagesize(struct thread *, struct ofreebsd32_getpagesize_args *);
|
||||
int ofreebsd32_mmap(struct thread *, struct ofreebsd32_mmap_args *);
|
||||
int ofreebsd32_sigreturn(struct thread *, struct ofreebsd32_sigreturn_args *);
|
||||
int ofreebsd32_sigvec(struct thread *, struct ofreebsd32_sigvec_args *);
|
||||
@ -1231,7 +1220,6 @@ struct freebsd10_freebsd32_umtx_unlock_args {
|
||||
#ifdef PAD64_REQUIRED
|
||||
#else
|
||||
#endif
|
||||
int freebsd10_freebsd32_pipe(struct thread *, struct freebsd10_freebsd32_pipe_args *);
|
||||
int freebsd10_freebsd32_umtx_lock(struct thread *, struct freebsd10_freebsd32_umtx_lock_args *);
|
||||
int freebsd10_freebsd32_umtx_unlock(struct thread *, struct freebsd10_freebsd32_umtx_unlock_args *);
|
||||
|
||||
@ -1343,15 +1331,12 @@ int freebsd11_freebsd32_fstatat(struct thread *, struct freebsd11_freebsd32_fsta
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_recvfrom AUE_RECVFROM
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_stat AUE_STAT
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_lstat AUE_LSTAT
|
||||
#define FREEBSD32_SYS_AUE_freebsd10_freebsd32_pipe AUE_PIPE
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_sigaction AUE_SIGACTION
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_sigprocmask AUE_SIGPROCMASK
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_sigpending AUE_SIGPENDING
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_sigaltstack AUE_SIGALTSTACK
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_ioctl AUE_IOCTL
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_execve AUE_EXECVE
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_fstat AUE_FSTAT
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_getpagesize AUE_NULL
|
||||
#define FREEBSD32_SYS_AUE_ofreebsd32_mmap AUE_MMAP
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_mprotect AUE_MPROTECT
|
||||
#define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER
|
||||
|
@ -47,7 +47,7 @@
|
||||
#define FREEBSD32_SYS_getppid 39
|
||||
/* 40 is old freebsd32_lstat */
|
||||
#define FREEBSD32_SYS_dup 41
|
||||
#define FREEBSD32_SYS_freebsd10_freebsd32_pipe 42
|
||||
#define FREEBSD32_SYS_freebsd10_pipe 42
|
||||
#define FREEBSD32_SYS_getegid 43
|
||||
#define FREEBSD32_SYS_profil 44
|
||||
#define FREEBSD32_SYS_ktrace 45
|
||||
@ -57,7 +57,7 @@
|
||||
#define FREEBSD32_SYS_getlogin 49
|
||||
#define FREEBSD32_SYS_setlogin 50
|
||||
#define FREEBSD32_SYS_acct 51
|
||||
/* 52 is old freebsd32_sigpending */
|
||||
/* 52 is old sigpending */
|
||||
#define FREEBSD32_SYS_freebsd32_sigaltstack 53
|
||||
#define FREEBSD32_SYS_freebsd32_ioctl 54
|
||||
#define FREEBSD32_SYS_reboot 55
|
||||
@ -69,7 +69,7 @@
|
||||
#define FREEBSD32_SYS_chroot 61
|
||||
/* 62 is old freebsd32_fstat */
|
||||
/* 63 is obsolete ogetkerninfo */
|
||||
/* 64 is old freebsd32_getpagesize */
|
||||
/* 64 is old getpagesize */
|
||||
#define FREEBSD32_SYS_msync 65
|
||||
#define FREEBSD32_SYS_vfork 66
|
||||
/* 67 is obsolete vread */
|
||||
|
@ -51,7 +51,7 @@ const char *freebsd32_syscallnames[] = {
|
||||
"getppid", /* 39 = getppid */
|
||||
"compat.freebsd32_lstat", /* 40 = old freebsd32_lstat */
|
||||
"dup", /* 41 = dup */
|
||||
"compat10.freebsd32_pipe", /* 42 = freebsd10 freebsd32_pipe */
|
||||
"compat10.pipe", /* 42 = freebsd10 pipe */
|
||||
"getegid", /* 43 = getegid */
|
||||
"profil", /* 44 = profil */
|
||||
"ktrace", /* 45 = ktrace */
|
||||
@ -61,7 +61,7 @@ const char *freebsd32_syscallnames[] = {
|
||||
"getlogin", /* 49 = getlogin */
|
||||
"setlogin", /* 50 = setlogin */
|
||||
"acct", /* 51 = acct */
|
||||
"compat.freebsd32_sigpending", /* 52 = old freebsd32_sigpending */
|
||||
"compat.sigpending", /* 52 = old sigpending */
|
||||
"freebsd32_sigaltstack", /* 53 = freebsd32_sigaltstack */
|
||||
"freebsd32_ioctl", /* 54 = freebsd32_ioctl */
|
||||
"reboot", /* 55 = reboot */
|
||||
@ -73,7 +73,7 @@ const char *freebsd32_syscallnames[] = {
|
||||
"chroot", /* 61 = chroot */
|
||||
"compat.freebsd32_fstat", /* 62 = old freebsd32_fstat */
|
||||
"obs_ogetkerninfo", /* 63 = obsolete ogetkerninfo */
|
||||
"compat.freebsd32_getpagesize", /* 64 = old freebsd32_getpagesize */
|
||||
"compat.getpagesize", /* 64 = old getpagesize */
|
||||
"msync", /* 65 = msync */
|
||||
"vfork", /* 66 = vfork */
|
||||
"obs_vread", /* 67 = obsolete vread */
|
||||
|
@ -104,7 +104,7 @@ struct sysent freebsd32_sysent[] = {
|
||||
{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_getppid, .sy_auevent = AUE_GETPPID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 39 = getppid */
|
||||
{ compat(AS(ofreebsd32_lstat_args),freebsd32_lstat), .sy_auevent = AUE_LSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 40 = old freebsd32_lstat */
|
||||
{ .sy_narg = AS(dup_args), .sy_call = (sy_call_t *)sys_dup, .sy_auevent = AUE_DUP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 41 = dup */
|
||||
{ compat10(0,freebsd32_pipe), .sy_auevent = AUE_PIPE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */
|
||||
{ compat10(0,pipe), .sy_auevent = AUE_PIPE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 42 = freebsd10 pipe */
|
||||
{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_getegid, .sy_auevent = AUE_GETEGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 43 = getegid */
|
||||
{ .sy_narg = AS(profil_args), .sy_call = (sy_call_t *)sys_profil, .sy_auevent = AUE_PROFILE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 44 = profil */
|
||||
{ .sy_narg = AS(ktrace_args), .sy_call = (sy_call_t *)sys_ktrace, .sy_auevent = AUE_KTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 45 = ktrace */
|
||||
@ -114,7 +114,7 @@ struct sysent freebsd32_sysent[] = {
|
||||
{ .sy_narg = AS(getlogin_args), .sy_call = (sy_call_t *)sys_getlogin, .sy_auevent = AUE_GETLOGIN, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 49 = getlogin */
|
||||
{ .sy_narg = AS(setlogin_args), .sy_call = (sy_call_t *)sys_setlogin, .sy_auevent = AUE_SETLOGIN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 50 = setlogin */
|
||||
{ .sy_narg = AS(acct_args), .sy_call = (sy_call_t *)sys_acct, .sy_auevent = AUE_ACCT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 51 = acct */
|
||||
{ compat(0,freebsd32_sigpending), .sy_auevent = AUE_SIGPENDING, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */
|
||||
{ compat(0,sigpending), .sy_auevent = AUE_SIGPENDING, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 52 = old sigpending */
|
||||
{ .sy_narg = AS(freebsd32_sigaltstack_args), .sy_call = (sy_call_t *)freebsd32_sigaltstack, .sy_auevent = AUE_SIGALTSTACK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */
|
||||
{ .sy_narg = AS(freebsd32_ioctl_args), .sy_call = (sy_call_t *)freebsd32_ioctl, .sy_auevent = AUE_IOCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 54 = freebsd32_ioctl */
|
||||
{ .sy_narg = AS(reboot_args), .sy_call = (sy_call_t *)sys_reboot, .sy_auevent = AUE_REBOOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 55 = reboot */
|
||||
@ -126,7 +126,7 @@ struct sysent freebsd32_sysent[] = {
|
||||
{ .sy_narg = AS(chroot_args), .sy_call = (sy_call_t *)sys_chroot, .sy_auevent = AUE_CHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 61 = chroot */
|
||||
{ compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), .sy_auevent = AUE_FSTAT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 62 = old freebsd32_fstat */
|
||||
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 63 = obsolete ogetkerninfo */
|
||||
{ compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */
|
||||
{ compat(0,getpagesize), .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 64 = old getpagesize */
|
||||
{ .sy_narg = AS(msync_args), .sy_call = (sy_call_t *)sys_msync, .sy_auevent = AUE_MSYNC, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 65 = msync */
|
||||
{ .sy_narg = 0, .sy_call = (sy_call_t *)sys_vfork, .sy_auevent = AUE_VFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 66 = vfork */
|
||||
{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 67 = obsolete vread */
|
||||
|
@ -132,7 +132,7 @@
|
||||
40 AUE_LSTAT COMPAT { int freebsd32_lstat(const char *path, \
|
||||
struct ostat32 *ub); }
|
||||
41 AUE_DUP NOPROTO { int dup(u_int fd); }
|
||||
42 AUE_PIPE COMPAT10 { int freebsd32_pipe(void); }
|
||||
42 AUE_PIPE COMPAT10|NOPROTO { int pipe(void); }
|
||||
43 AUE_GETEGID NOPROTO { gid_t getegid(void); }
|
||||
44 AUE_PROFILE NOPROTO { int profil(char *samples, size_t size, \
|
||||
size_t offset, u_int scale); }
|
||||
@ -148,7 +148,7 @@
|
||||
u_int namelen); }
|
||||
50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); }
|
||||
51 AUE_ACCT NOPROTO { int acct(const char *path); }
|
||||
52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); }
|
||||
52 AUE_SIGPENDING COMPAT|NOPROTO { int sigpending(void); }
|
||||
53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \
|
||||
const struct sigaltstack32 *ss, \
|
||||
struct sigaltstack32 *oss); }
|
||||
@ -167,8 +167,7 @@
|
||||
62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \
|
||||
struct ostat32 *sb); }
|
||||
63 AUE_NULL OBSOL ogetkerninfo
|
||||
64 AUE_NULL COMPAT { int freebsd32_getpagesize( \
|
||||
int32_t dummy); }
|
||||
64 AUE_NULL COMPAT|NOPROTO { int getpagesize(void); }
|
||||
65 AUE_MSYNC NOPROTO { int msync(void *addr, size_t len, \
|
||||
int flags); }
|
||||
66 AUE_VFORK NOPROTO { int vfork(void); }
|
||||
|
Loading…
Reference in New Issue
Block a user