Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/aout Eliminate passthrough syscalls stubs which o...



details:   https://anonhg.NetBSD.org/src/rev/8068d932a894
branches:  trunk
changeset: 509936:8068d932a894
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue May 15 21:37:47 2001 +0000

description:
Eliminate passthrough syscalls stubs which only call appropriate sys_foo()
without any change.
Fixes kern/7270 by Bill Sommerfeld.

diffstat:

 sys/compat/aout/aout_misc.c     |  144 +---------------------------------------
 sys/compat/aout/syscalls.master |   18 ++--
 2 files changed, 10 insertions(+), 152 deletions(-)

diffs (273 lines):

diff -r a010417e7db7 -r 8068d932a894 sys/compat/aout/aout_misc.c
--- a/sys/compat/aout/aout_misc.c       Tue May 15 21:37:33 2001 +0000
+++ b/sys/compat/aout/aout_misc.c       Tue May 15 21:37:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aout_misc.c,v 1.6 2001/01/22 20:08:03 jdolecek Exp $   */
+/*     $NetBSD: aout_misc.c,v 1.7 2001/05/15 21:37:47 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -81,23 +81,6 @@
 
 
 int
-aout_sys_creat(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_creat_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return compat_43_sys_creat(p, v, retval);
-}
-
-
-int
 aout_sys_link(p, v, retval)
        struct proc *p;
        void *v;
@@ -146,23 +129,6 @@
 
 
 int
-aout_sys_mknod(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_mknod_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_mknod(p, v, retval);
-}
-
-
-int
 aout_sys_chmod(p, v, retval)
        struct proc *p;
        void *v;
@@ -193,27 +159,6 @@
 
 
 int
-aout_sys_mount(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-/*
- * Don't try to translate the mount point,
- * to avoid e.g. mounting the /usr filesystem on /emul/aout/usr.
- */
-#if 0
-       struct aout_sys_mount_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_mount(p, v, retval);
-}
-
-
-int
 aout_sys_unmount(p, v, retval)
        struct proc *p;
        void *v;
@@ -287,42 +232,6 @@
        return compat_43_sys_lstat(p, v, retval);
 }
 
-#ifdef KTRACE
-int
-aout_sys_ktrace(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_ktrace_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, fname));
-#endif
-
-       return sys_ktrace(p, v, retval);
-}
-#endif
-
-
-int
-aout_sys_acct(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_acct_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_acct(p, v, retval);
-}
-
-
 int
 aout_sys_revoke(p, v, retval)
        struct proc *p;
@@ -435,40 +344,6 @@
 
 
 int
-aout_sys_mkfifo(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_mkfifo_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_mkfifo(p, v, retval);
-}
-
-
-int
-aout_sys_mkdir(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_mkdir_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_mkdir(p, v, retval);
-}
-
-
-int
 aout_sys_rmdir(p, v, retval)
        struct proc *p;
        void *v;
@@ -499,23 +374,6 @@
 
 
 int
-aout_sys_quotactl(p, v, retval)
-       struct proc *p;
-       void *v;
-       register_t *retval;
-{
-#if 0
-       struct aout_sys_quotactl_args *uap = v;
-       caddr_t sg = stackgap_init(p->p_emul);
-
-       CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-#endif
-
-       return sys_quotactl(p, v, retval);
-}
-
-
-int
 aout_sys_statfs(p, v, retval)
        struct proc *p;
        void *v;
diff -r a010417e7db7 -r 8068d932a894 sys/compat/aout/syscalls.master
--- a/sys/compat/aout/syscalls.master   Tue May 15 21:37:33 2001 +0000
+++ b/sys/compat/aout/syscalls.master   Tue May 15 21:37:47 2001 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.13 2001/01/27 07:50:11 thorpej Exp $
+       $NetBSD: syscalls.master,v 1.14 2001/05/15 21:37:48 jdolecek Exp $
 
 ;      @(#)syscalls.master     8.2 (Berkeley) 1/13/94
 
@@ -72,7 +72,7 @@
 6      NOARGS          { int sys_close(int fd); }
 7      NOARGS          { int sys_wait4(int pid, int *status, int options, \
                            struct rusage *rusage); }
-8      STD             { int aout_sys_creat(const char *path, mode_t mode); } \
+8      NOARGS          { int compat_43_sys_creat(const char *path, mode_t mode); } \
                            ocreat
 9      STD             { int aout_sys_link(const char *path, \
                            const char *link); }
@@ -80,7 +80,7 @@
 11     OBSOL           execv
 12     STD             { int aout_sys_chdir(const char *path); }
 13     NOARGS          { int sys_fchdir(int fd); }
-14     STD             { int aout_sys_mknod(const char *path, mode_t mode, \
+14     NOARGS          { int sys_mknod(const char *path, mode_t mode, \
                            dev_t dev); }
 15     STD             { int aout_sys_chmod(const char *path, mode_t mode); }
 16     STD             { int aout_sys_chown(const char *path, uid_t uid, \
@@ -91,7 +91,7 @@
 19     NOARGS          { long compat_43_sys_lseek(int fd, long offset, \
                            int whence); } olseek
 20     NOARGS MPSAFE   { pid_t sys_getpid(void); }
-21     STD             { int aout_sys_mount(const char *type, \
+21     NOARGS          { int sys_mount(const char *type, \
                            const char *path, int flags, void *data); }
 22     STD             { int aout_sys_unmount(const char *path, int flags); }
 23     NOARGS          { int sys_setuid(uid_t uid); }
@@ -129,7 +129,7 @@
 44     NOARGS          { int sys_profil(caddr_t samples, size_t size, \
                            u_long offset, u_int scale); }
 #if defined(KTRACE) || !defined(_KERNEL)
-45     STD             { int aout_sys_ktrace(const char *fname, int ops, \
+45     NOARGS          { int sys_ktrace(const char *fname, int ops, \
                            int facs, int pid); }
 #else
 45     EXCL            ktrace
@@ -142,7 +142,7 @@
                            int mask); } sigprocmask13
 49     NOARGS          { int sys___getlogin(char *namebuf, size_t namelen); }
 50     NOARGS          { int sys_setlogin(const char *namebuf); }
-51     STD             { int aout_sys_acct(const char *path); }
+51     NOARGS          { int sys_acct(const char *path); }
 52     NOARGS          { int compat_13_sys_sigpending(void); } sigpending13
 53     NOARGS          { int compat_13_sys_sigaltstack( \
                            const struct sigaltstack13 *nss, \
@@ -266,14 +266,14 @@
 130    NOARGS          { int compat_43_sys_ftruncate(int fd, long length); } \
                            oftruncate
 131    NOARGS          { int sys_flock(int fd, int how); }
-132    STD             { int aout_sys_mkfifo(const char *path, mode_t mode); }
+132    NOARGS          { int sys_mkfifo(const char *path, mode_t mode); }
 133    NOARGS          { ssize_t sys_sendto(int s, const void *buf, \
                            size_t len, int flags, const struct sockaddr *to, \
                            int tolen); }
 134    NOARGS          { int sys_shutdown(int s, int how); }
 135    NOARGS          { int sys_socketpair(int domain, int type, \
                            int protocol, int *rsv); }
-136    STD             { int aout_sys_mkdir(const char *path, mode_t mode); }
+136    NOARGS          { int sys_mkdir(const char *path, mode_t mode); }
 137    STD             { int aout_sys_rmdir(const char *path); }
 138    STD             { int aout_sys_utimes(const char *path, \
                            const struct timeval *tptr); }
@@ -292,7 +292,7 @@
 146    NOARGS          { int compat_43_sys_killpg(int pgid, int signum); } \
                            okillpg
 147    NOARGS          { int sys_setsid(void); }
-148    STD             { int aout_sys_quotactl(const char *path, \
+148    NOARGS          { int sys_quotactl(const char *path, \
                            int cmd, int uid, caddr_t arg); }
 149    NOARGS          { int compat_43_sys_quota(void); } oquota
 150    NOARGS          { int compat_43_sys_getsockname(int fdec, caddr_t asa, \



Home | Main Index | Thread Index | Old Index