summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
committerkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
commit99851f359e6f006b3223bb37dbc49e751ca8c13a (patch)
tree2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/compat
parentbf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff)
downloadFreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip
FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_ioctl.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c38
-rw-r--r--sys/compat/freebsd32/freebsd32_util.h9
-rw-r--r--sys/compat/linux/linux_emul.c4
-rw-r--r--sys/compat/linux/linux_file.c14
-rw-r--r--sys/compat/linux/linux_ioctl.c254
-rw-r--r--sys/compat/linux/linux_ipc.c12
-rw-r--r--sys/compat/linux/linux_misc.c26
-rw-r--r--sys/compat/linux/linux_signal.c2
-rw-r--r--sys/compat/linux/linux_socket.c26
-rw-r--r--sys/compat/linux/linux_uid16.c16
-rw-r--r--sys/compat/svr4/svr4_fcntl.c4
-rw-r--r--sys/compat/svr4/svr4_filio.c2
-rw-r--r--sys/compat/svr4/svr4_ipc.c16
-rw-r--r--sys/compat/svr4/svr4_misc.c20
-rw-r--r--sys/compat/svr4/svr4_signal.c2
-rw-r--r--sys/compat/svr4/svr4_socket.c2
-rw-r--r--sys/compat/svr4/svr4_stat.c2
-rw-r--r--sys/compat/svr4/svr4_stream.c20
19 files changed, 240 insertions, 231 deletions
diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c
index 1d773ca..81f5c8e 100644
--- a/sys/compat/freebsd32/freebsd32_ioctl.c
+++ b/sys/compat/freebsd32/freebsd32_ioctl.c
@@ -396,7 +396,7 @@ freebsd32_ioctl(struct thread *td, struct freebsd32_ioctl_args *uap)
ap.fd = uap->fd;
ap.com = uap->com;
PTRIN_CP(*uap, ap, data);
- return ioctl(td, &ap);
+ return sys_ioctl(td, &ap);
}
fdrop(fp, td);
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 5b6e895..6d28715 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -425,7 +425,7 @@ freebsd32_mmap_partial(struct thread *td, vm_offset_t start, vm_offset_t end,
r.buf = (void *) start;
r.nbyte = end - start;
r.offset = pos;
- return (pread(td, &r));
+ return (sys_pread(td, &r));
} else {
while (start < end) {
subyte((void *) start, 0);
@@ -500,7 +500,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
r.buf = (void *) start;
r.nbyte = end - start;
r.offset = pos;
- error = pread(td, &r);
+ error = sys_pread(td, &r);
if (error)
return (error);
@@ -527,7 +527,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
ap.fd = fd;
ap.pos = pos;
- return (mmap(td, &ap));
+ return (sys_mmap(td, &ap));
}
#ifdef COMPAT_FREEBSD6
@@ -1401,7 +1401,7 @@ freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap)
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
- return (pread(td, &ap));
+ return (sys_pread(td, &ap));
}
int
@@ -1413,7 +1413,7 @@ freebsd32_pwrite(struct thread *td, struct freebsd32_pwrite_args *uap)
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
- return (pwrite(td, &ap));
+ return (sys_pwrite(td, &ap));
}
#ifdef COMPAT_43
@@ -1425,7 +1425,7 @@ ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap)
nuap.fd = uap->fd;
nuap.offset = uap->offset;
nuap.whence = uap->whence;
- return (lseek(td, &nuap));
+ return (sys_lseek(td, &nuap));
}
#endif
@@ -1439,7 +1439,7 @@ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap)
ap.fd = uap->fd;
ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
- error = lseek(td, &ap);
+ error = sys_lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
pos = *(off_t *)(td->td_retval);
td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */
@@ -1454,7 +1454,7 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
ap.path = uap->path;
ap.length = PAIR32TO64(off_t,uap->length);
- return (truncate(td, &ap));
+ return (sys_truncate(td, &ap));
}
int
@@ -1464,7 +1464,7 @@ freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap)
ap.fd = uap->fd;
ap.length = PAIR32TO64(off_t,uap->length);
- return (ftruncate(td, &ap));
+ return (sys_ftruncate(td, &ap));
}
#ifdef COMPAT_43
@@ -1519,7 +1519,7 @@ freebsd6_freebsd32_pread(struct thread *td, struct freebsd6_freebsd32_pread_args
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
- return (pread(td, &ap));
+ return (sys_pread(td, &ap));
}
int
@@ -1531,7 +1531,7 @@ freebsd6_freebsd32_pwrite(struct thread *td, struct freebsd6_freebsd32_pwrite_ar
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
- return (pwrite(td, &ap));
+ return (sys_pwrite(td, &ap));
}
int
@@ -1544,7 +1544,7 @@ freebsd6_freebsd32_lseek(struct thread *td, struct freebsd6_freebsd32_lseek_args
ap.fd = uap->fd;
ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
- error = lseek(td, &ap);
+ error = sys_lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
pos = *(off_t *)(td->td_retval);
td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */
@@ -1559,7 +1559,7 @@ freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncat
ap.path = uap->path;
ap.length = PAIR32TO64(off_t,uap->length);
- return (truncate(td, &ap));
+ return (sys_truncate(td, &ap));
}
int
@@ -1569,7 +1569,7 @@ freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftrunc
ap.fd = uap->fd;
ap.length = PAIR32TO64(off_t,uap->length);
- return (ftruncate(td, &ap));
+ return (sys_ftruncate(td, &ap));
}
#endif /* COMPAT_FREEBSD6 */
@@ -2409,7 +2409,7 @@ freebsd32_cpuset_setid(struct thread *td,
ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
- return (cpuset_setid(td, &ap));
+ return (sys_cpuset_setid(td, &ap));
}
int
@@ -2423,7 +2423,7 @@ freebsd32_cpuset_getid(struct thread *td,
ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
- return (cpuset_getid(td, &ap));
+ return (sys_cpuset_getid(td, &ap));
}
int
@@ -2438,7 +2438,7 @@ freebsd32_cpuset_getaffinity(struct thread *td,
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
- return (cpuset_getaffinity(td, &ap));
+ return (sys_cpuset_getaffinity(td, &ap));
}
int
@@ -2453,7 +2453,7 @@ freebsd32_cpuset_setaffinity(struct thread *td,
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
- return (cpuset_setaffinity(td, &ap));
+ return (sys_cpuset_setaffinity(td, &ap));
}
int
@@ -2813,5 +2813,5 @@ freebsd32_posix_fallocate(struct thread *td,
ap.fd = uap->fd;
ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32));
- return (posix_fallocate(td, &ap));
+ return (sys_posix_fallocate(td, &ap));
}
diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h
index 0fed7b0..9282275 100644
--- a/sys/compat/freebsd32/freebsd32_util.h
+++ b/sys/compat/freebsd32/freebsd32_util.h
@@ -88,6 +88,15 @@ SYSCALL32_MODULE(syscallname, \
.syscall_no = FREEBSD32_SYS_##syscallname \
}
+#define SYSCALL32_INIT_HELPER_COMPAT(syscallname) { \
+ .new_sysent = { \
+ .sy_narg = (sizeof(struct syscallname ## _args ) \
+ / sizeof(register_t)), \
+ .sy_call = (sy_call_t *)& sys_ ## syscallname, \
+ }, \
+ .syscall_no = FREEBSD32_SYS_##syscallname \
+}
+
int syscall32_register(int *offset, struct sysent *new_sysent,
struct sysent *old_sysent);
int syscall32_deregister(int *offset, struct sysent *old_sysent);
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c
index 7585c0d..d6b2f71 100644
--- a/sys/compat/linux/linux_emul.c
+++ b/sys/compat/linux/linux_emul.c
@@ -244,7 +244,7 @@ linux_proc_exit(void *arg __unused, struct proc *p)
KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid));
PROC_LOCK(q);
if ((q->p_flag & P_WEXIT) == 0 && em->pdeath_signal != 0) {
- psignal(q, em->pdeath_signal);
+ kern_psignal(q, em->pdeath_signal);
}
PROC_UNLOCK(q);
EMUL_UNLOCK(&emul_lock);
@@ -362,7 +362,7 @@ linux_kill_threads(struct thread *td, int sig)
sp = pfind(em->pid);
if ((sp->p_flag & P_WEXIT) == 0)
- psignal(sp, sig);
+ kern_psignal(sp, sig);
PROC_UNLOCK(sp);
#ifdef DEBUG
printf(LMSG("linux_kill_threads: kill PID %d\n"), em->pid);
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index e923032..9cbc3a2 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -232,7 +232,7 @@ linux_lseek(struct thread *td, struct linux_lseek_args *args)
tmp_args.fd = args->fdes;
tmp_args.offset = (off_t)args->off;
tmp_args.whence = args->whence;
- error = lseek(td, &tmp_args);
+ error = sys_lseek(td, &tmp_args);
return error;
}
@@ -254,7 +254,7 @@ linux_llseek(struct thread *td, struct linux_llseek_args *args)
bsd_args.offset = off;
bsd_args.whence = args->whence;
- if ((error = lseek(td, &bsd_args)))
+ if ((error = sys_lseek(td, &bsd_args)))
return error;
if ((error = copyout(td->td_retval, args->res, sizeof (off_t))))
@@ -951,7 +951,7 @@ linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args)
nuap.fd = args->fd;
nuap.length = args->length;
- return (ftruncate(td, &nuap));
+ return (sys_ftruncate(td, &nuap));
}
int
@@ -1021,7 +1021,7 @@ linux_fdatasync(td, uap)
struct fsync_args bsd;
bsd.fd = uap->fd;
- return fsync(td, &bsd);
+ return sys_fsync(td, &bsd);
}
int
@@ -1038,7 +1038,7 @@ linux_pread(td, uap)
bsd.nbyte = uap->nbyte;
bsd.offset = uap->offset;
- error = pread(td, &bsd);
+ error = sys_pread(td, &bsd);
if (error == 0) {
/* This seems to violate POSIX but linux does it */
@@ -1065,7 +1065,7 @@ linux_pwrite(td, uap)
bsd.buf = uap->buf;
bsd.nbyte = uap->nbyte;
bsd.offset = uap->offset;
- return pwrite(td, &bsd);
+ return sys_pwrite(td, &bsd);
}
int
@@ -1163,7 +1163,7 @@ linux_umount(struct thread *td, struct linux_umount_args *args)
bsd.path = args->path;
bsd.flags = args->flags; /* XXX correct? */
- return (unmount(td, &bsd));
+ return (sys_unmount(td, &bsd));
}
/*
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index d021fba..15e3136 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -803,7 +803,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
wr.fd = args->fd;
wr.buf = &c;
wr.nbyte = sizeof(c);
- return (write(td, &wr));
+ return (sys_write(td, &wr));
} else
return (0);
}
@@ -812,7 +812,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
return (EINVAL);
}
args->arg = 0;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
}
@@ -838,27 +838,27 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCEXCL:
args->cmd = TIOCEXCL;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCNXCL:
args->cmd = TIOCNXCL;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSCTTY:
args->cmd = TIOCSCTTY;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGPGRP:
args->cmd = TIOCGPGRP;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSPGRP:
args->cmd = TIOCSPGRP;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCOUTQ */
@@ -866,32 +866,32 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCGWINSZ:
args->cmd = TIOCGWINSZ;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSWINSZ:
args->cmd = TIOCSWINSZ;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMGET:
args->cmd = TIOCMGET;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMBIS:
args->cmd = TIOCMBIS;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMBIC:
args->cmd = TIOCMBIC;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMSET:
args->cmd = TIOCMSET;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* TIOCGSOFTCAR */
@@ -899,14 +899,14 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIONREAD: /* LINUX_TIOCINQ */
args->cmd = FIONREAD;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCLINUX */
case LINUX_TIOCCONS:
args->cmd = TIOCCONS;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGSERIAL: {
@@ -932,17 +932,17 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCPKT:
args->cmd = TIOCPKT;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIONBIO:
args->cmd = FIONBIO;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCNOTTY:
args->cmd = TIOCNOTTY;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSETD: {
@@ -996,17 +996,17 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIONCLEX:
args->cmd = FIONCLEX;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIOCLEX:
args->cmd = FIOCLEX;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIOASYNC:
args->cmd = FIOASYNC;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCSERCONFIG */
@@ -1017,12 +1017,12 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCSBRK:
args->cmd = TIOCSBRK;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCCBRK:
args->cmd = TIOCCBRK;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGPTN: {
int nb;
@@ -1447,22 +1447,22 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMPAUSE:
args->cmd = CDIOCPAUSE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMRESUME:
args->cmd = CDIOCRESUME;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMPLAYMSF:
args->cmd = CDIOCPLAYMSF;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMPLAYTRKIND:
args->cmd = CDIOCPLAYTRACKS;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMREADTOCHDR: {
@@ -1501,17 +1501,17 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMSTOP:
args->cmd = CDIOCSTOP;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMSTART:
args->cmd = CDIOCSTART;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMEJECT:
args->cmd = CDIOCEJECT;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_CDROMVOLCTRL */
@@ -1555,7 +1555,7 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMRESET:
args->cmd = CDIOCRESET;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_CDROMVOLREAD */
@@ -1689,71 +1689,71 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SOUND_MIXER_WRITE_VOLUME:
args->cmd = SETDIR(SOUND_MIXER_WRITE_VOLUME);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_BASS:
args->cmd = SETDIR(SOUND_MIXER_WRITE_BASS);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_TREBLE:
args->cmd = SETDIR(SOUND_MIXER_WRITE_TREBLE);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_SYNTH:
args->cmd = SETDIR(SOUND_MIXER_WRITE_SYNTH);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_PCM:
args->cmd = SETDIR(SOUND_MIXER_WRITE_PCM);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_SPEAKER:
args->cmd = SETDIR(SOUND_MIXER_WRITE_SPEAKER);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_MIC:
args->cmd = SETDIR(SOUND_MIXER_WRITE_MIC);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_CD:
args->cmd = SETDIR(SOUND_MIXER_WRITE_CD);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_IMIX:
args->cmd = SETDIR(SOUND_MIXER_WRITE_IMIX);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_ALTPCM:
args->cmd = SETDIR(SOUND_MIXER_WRITE_ALTPCM);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_RECLEV:
args->cmd = SETDIR(SOUND_MIXER_WRITE_RECLEV);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_IGAIN:
args->cmd = SETDIR(SOUND_MIXER_WRITE_IGAIN);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_OGAIN:
args->cmd = SETDIR(SOUND_MIXER_WRITE_OGAIN);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE1:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE1);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE2:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE2);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE3:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE3);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_INFO: {
/* Key on encoded length */
@@ -1787,167 +1787,167 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SOUND_MIXER_READ_STEREODEVS:
args->cmd = SOUND_MIXER_READ_STEREODEVS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_CAPS:
args->cmd = SOUND_MIXER_READ_CAPS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_RECMASK:
args->cmd = SOUND_MIXER_READ_RECMASK;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_DEVMASK:
args->cmd = SOUND_MIXER_READ_DEVMASK;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_RECSRC:
args->cmd = SETDIR(SOUND_MIXER_WRITE_RECSRC);
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_RESET:
args->cmd = SNDCTL_DSP_RESET;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SYNC:
args->cmd = SNDCTL_DSP_SYNC;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SPEED:
args->cmd = SNDCTL_DSP_SPEED;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_STEREO:
args->cmd = SNDCTL_DSP_STEREO;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETBLKSIZE: /* LINUX_SNDCTL_DSP_SETBLKSIZE */
args->cmd = SNDCTL_DSP_GETBLKSIZE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETFMT:
args->cmd = SNDCTL_DSP_SETFMT;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_PCM_WRITE_CHANNELS:
args->cmd = SOUND_PCM_WRITE_CHANNELS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_PCM_WRITE_FILTER:
args->cmd = SOUND_PCM_WRITE_FILTER;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_POST:
args->cmd = SNDCTL_DSP_POST;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SUBDIVIDE:
args->cmd = SNDCTL_DSP_SUBDIVIDE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETFRAGMENT:
args->cmd = SNDCTL_DSP_SETFRAGMENT;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETFMTS:
args->cmd = SNDCTL_DSP_GETFMTS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETOSPACE:
args->cmd = SNDCTL_DSP_GETOSPACE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETISPACE:
args->cmd = SNDCTL_DSP_GETISPACE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_NONBLOCK:
args->cmd = SNDCTL_DSP_NONBLOCK;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETCAPS:
args->cmd = SNDCTL_DSP_GETCAPS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETTRIGGER: /* LINUX_SNDCTL_GETTRIGGER */
args->cmd = SNDCTL_DSP_SETTRIGGER;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETIPTR:
args->cmd = SNDCTL_DSP_GETIPTR;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETOPTR:
args->cmd = SNDCTL_DSP_GETOPTR;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETDUPLEX:
args->cmd = SNDCTL_DSP_SETDUPLEX;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETODELAY:
args->cmd = SNDCTL_DSP_GETODELAY;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_RESET:
args->cmd = SNDCTL_SEQ_RESET;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_SYNC:
args->cmd = SNDCTL_SEQ_SYNC;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SYNTH_INFO:
args->cmd = SNDCTL_SYNTH_INFO;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_CTRLRATE:
args->cmd = SNDCTL_SEQ_CTRLRATE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_GETOUTCOUNT:
args->cmd = SNDCTL_SEQ_GETOUTCOUNT;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_GETINCOUNT:
args->cmd = SNDCTL_SEQ_GETINCOUNT;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_PERCMODE:
args->cmd = SNDCTL_SEQ_PERCMODE;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_FM_LOAD_INSTR:
args->cmd = SNDCTL_FM_LOAD_INSTR;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_TESTMIDI:
args->cmd = SNDCTL_SEQ_TESTMIDI;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_RESETSAMPLES:
args->cmd = SNDCTL_SEQ_RESETSAMPLES;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_NRSYNTHS:
args->cmd = SNDCTL_SEQ_NRSYNTHS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_NRMIDIS:
args->cmd = SNDCTL_SEQ_NRMIDIS;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_MIDI_INFO:
args->cmd = SNDCTL_MIDI_INFO;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_TRESHOLD:
args->cmd = SNDCTL_SEQ_TRESHOLD;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SYNTH_MEMAVL:
args->cmd = SNDCTL_SYNTH_MEMAVL;
- return (ioctl(td, (struct ioctl_args *)args));
+ return (sys_ioctl(td, (struct ioctl_args *)args));
}
@@ -1972,37 +1972,37 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
case LINUX_KIOCSOUND:
args->cmd = KIOCSOUND;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDMKTONE:
args->cmd = KDMKTONE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGETLED:
args->cmd = KDGETLED;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSETLED:
args->cmd = KDSETLED;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSETMODE:
args->cmd = KDSETMODE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGETMODE:
args->cmd = KDGETMODE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGKBMODE:
args->cmd = KDGKBMODE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSKBMODE: {
@@ -2028,12 +2028,12 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
case LINUX_VT_OPENQRY:
args->cmd = VT_OPENQRY;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_GETMODE:
args->cmd = VT_GETMODE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_SETMODE: {
@@ -2045,28 +2045,28 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
if ((error = copyout(&mode, (void *)args->arg, sizeof(mode))))
break;
args->cmd = VT_SETMODE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
}
case LINUX_VT_GETSTATE:
args->cmd = VT_GETACTIVE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_RELDISP:
args->cmd = VT_RELDISP;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_ACTIVATE:
args->cmd = VT_ACTIVATE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_WAITACTIVE:
args->cmd = VT_WAITACTIVE;
- error = (ioctl(td, (struct ioctl_args *)args));
+ error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
default:
@@ -2440,27 +2440,27 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIOSETOWN:
args->cmd = FIOSETOWN;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSPGRP:
args->cmd = SIOCSPGRP;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_FIOGETOWN:
args->cmd = FIOGETOWN;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGPGRP:
args->cmd = SIOCGPGRP;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCATMARK:
args->cmd = SIOCATMARK;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
/* LINUX_SIOCGSTAMP */
@@ -2476,31 +2476,31 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCGIFADDR:
args->cmd = SIOCGIFADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCSIFADDR:
/* XXX probably doesn't work, included for completeness */
args->cmd = SIOCSIFADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFDSTADDR:
args->cmd = SIOCGIFDSTADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCGIFBRDADDR:
args->cmd = SIOCGIFBRDADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCGIFNETMASK:
args->cmd = SIOCGIFNETMASK;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
@@ -2510,12 +2510,12 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCGIFMTU:
args->cmd = SIOCGIFMTU;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFMTU:
args->cmd = SIOCSIFMTU;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFNAME:
@@ -2532,17 +2532,17 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCADDMULTI:
args->cmd = SIOCADDMULTI;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCDELMULTI:
args->cmd = SIOCDELMULTI;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFINDEX:
args->cmd = SIOCGIFINDEX;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFCOUNT:
@@ -2555,12 +2555,12 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
*/
case LINUX_SIOCDEVPRIVATE:
args->cmd = SIOCGPRIVATE_0;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCDEVPRIVATE+1:
args->cmd = SIOCGPRIVATE_1;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
}
@@ -2599,7 +2599,7 @@ static int
linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args)
{
args->cmd = SETDIR(args->cmd);
- return ioctl(td, (struct ioctl_args *)args);
+ return sys_ioctl(td, (struct ioctl_args *)args);
}
static int
@@ -2971,7 +2971,7 @@ linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args)
default: return (ENOIOCTL);
}
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}
@@ -2986,15 +2986,15 @@ linux_ioctl_special(struct thread *td, struct linux_ioctl_args *args)
switch (args->cmd) {
case LINUX_SIOCGIFADDR:
args->cmd = SIOCGIFADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFADDR:
args->cmd = SIOCSIFADDR;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFFLAGS:
args->cmd = SIOCGIFFLAGS;
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
break;
default:
error = ENOIOCTL;
@@ -3295,7 +3295,7 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args)
default: return (ENOIOCTL);
}
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}
@@ -3411,7 +3411,7 @@ linux_ioctl_fbsd_usb(struct thread *td, struct linux_ioctl_args *args)
error = ENOIOCTL;
}
if (error != ENOIOCTL)
- error = ioctl(td, (struct ioctl_args *)args);
+ error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 36223b1..f72a02d 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -496,7 +496,7 @@ linux_semop(struct thread *td, struct linux_semop_args *args)
bsd_args.semid = args->semid;
bsd_args.sops = PTRIN(args->tsops);
bsd_args.nsops = args->nsops;
- return (semop(td, &bsd_args));
+ return (sys_semop(td, &bsd_args));
}
int
@@ -513,7 +513,7 @@ linux_semget(struct thread *td, struct linux_semget_args *args)
bsd_args.key = args->key;
bsd_args.nsems = args->nsems;
bsd_args.semflg = args->semflg;
- return (semget(td, &bsd_args));
+ return (sys_semget(td, &bsd_args));
}
int
@@ -661,7 +661,7 @@ linux_msgget(struct thread *td, struct linux_msgget_args *args)
bsd_args.key = args->key;
bsd_args.msgflg = args->msgflg;
- return (msgget(td, &bsd_args));
+ return (sys_msgget(td, &bsd_args));
}
int
@@ -753,7 +753,7 @@ linux_shmat(struct thread *td, struct linux_shmat_args *args)
bsd_args.shmid = args->shmid;
bsd_args.shmaddr = PTRIN(args->shmaddr);
bsd_args.shmflg = args->shmflg;
- if ((error = shmat(td, &bsd_args)))
+ if ((error = sys_shmat(td, &bsd_args)))
return (error);
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
addr = td->td_retval[0];
@@ -772,7 +772,7 @@ linux_shmdt(struct thread *td, struct linux_shmdt_args *args)
} */ bsd_args;
bsd_args.shmaddr = PTRIN(args->shmaddr);
- return (shmdt(td, &bsd_args));
+ return (sys_shmdt(td, &bsd_args));
}
int
@@ -787,7 +787,7 @@ linux_shmget(struct thread *td, struct linux_shmget_args *args)
bsd_args.key = args->key;
bsd_args.size = args->size;
bsd_args.shmflg = args->shmflg;
- return (shmget(td, &bsd_args));
+ return (sys_shmget(td, &bsd_args));
}
int
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index bbc805d..e7e0525 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -209,7 +209,7 @@ linux_brk(struct thread *td, struct linux_brk_args *args)
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
new = (vm_offset_t)args->dsend;
tmp.nsize = (char *)new;
- if (((caddr_t)new > vm->vm_daddr) && !obreak(td, &tmp))
+ if (((caddr_t)new > vm->vm_daddr) && !sys_obreak(td, &tmp))
td->td_retval[0] = (long)new;
else
td->td_retval[0] = (long)old;
@@ -609,7 +609,7 @@ linux_mremap(struct thread *td, struct linux_mremap_args *args)
bsd_args.addr =
(caddr_t)((uintptr_t)args->addr + args->new_len);
bsd_args.len = args->old_len - args->new_len;
- error = munmap(td, &bsd_args);
+ error = sys_munmap(td, &bsd_args);
}
td->td_retval[0] = error ? 0 : (uintptr_t)args->addr;
@@ -629,7 +629,7 @@ linux_msync(struct thread *td, struct linux_msync_args *args)
bsd_args.len = (uintptr_t)args->len;
bsd_args.flags = args->fl & ~LINUX_MS_SYNC;
- return (msync(td, &bsd_args));
+ return (sys_msync(td, &bsd_args));
}
int
@@ -1085,7 +1085,7 @@ linux_nice(struct thread *td, struct linux_nice_args *args)
bsd_args.which = PRIO_PROCESS;
bsd_args.who = 0; /* current process */
bsd_args.prio = args->inc;
- return (setpriority(td, &bsd_args));
+ return (sys_setpriority(td, &bsd_args));
}
int
@@ -1317,7 +1317,7 @@ linux_sched_setscheduler(struct thread *td,
bsd.pid = args->pid;
bsd.param = (struct sched_param *)args->param;
- return (sched_setscheduler(td, &bsd));
+ return (sys_sched_setscheduler(td, &bsd));
}
int
@@ -1333,7 +1333,7 @@ linux_sched_getscheduler(struct thread *td,
#endif
bsd.pid = args->pid;
- error = sched_getscheduler(td, &bsd);
+ error = sys_sched_getscheduler(td, &bsd);
switch (td->td_retval[0]) {
case SCHED_OTHER:
@@ -1374,7 +1374,7 @@ linux_sched_get_priority_max(struct thread *td,
default:
return (EINVAL);
}
- return (sched_get_priority_max(td, &bsd));
+ return (sys_sched_get_priority_max(td, &bsd));
}
int
@@ -1401,7 +1401,7 @@ linux_sched_get_priority_min(struct thread *td,
default:
return (EINVAL);
}
- return (sched_get_priority_min(td, &bsd));
+ return (sys_sched_get_priority_min(td, &bsd));
}
#define REBOOT_CAD_ON 0x89abcdef
@@ -1454,7 +1454,7 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args)
default:
return (EINVAL);
}
- return (reboot(td, &bsd_args));
+ return (sys_reboot(td, &bsd_args));
}
@@ -1592,7 +1592,7 @@ linux_getsid(struct thread *td, struct linux_getsid_args *args)
#endif
bsd.pid = args->pid;
- return (getsid(td, &bsd));
+ return (sys_getsid(td, &bsd));
}
int
@@ -1615,7 +1615,7 @@ linux_getpriority(struct thread *td, struct linux_getpriority_args *args)
bsd_args.which = args->which;
bsd_args.who = args->who;
- error = getpriority(td, &bsd_args);
+ error = sys_getpriority(td, &bsd_args);
td->td_retval[0] = 20 - td->td_retval[0];
return (error);
}
@@ -1893,7 +1893,7 @@ linux_sched_getaffinity(struct thread *td,
cga.cpusetsize = sizeof(cpuset_t);
cga.mask = (cpuset_t *) args->user_mask_ptr;
- if ((error = cpuset_getaffinity(td, &cga)) == 0)
+ if ((error = sys_cpuset_getaffinity(td, &cga)) == 0)
td->td_retval[0] = sizeof(cpuset_t);
return (error);
@@ -1922,5 +1922,5 @@ linux_sched_setaffinity(struct thread *td,
csa.cpusetsize = sizeof(cpuset_t);
csa.mask = (cpuset_t *) args->user_mask_ptr;
- return (cpuset_setaffinity(td, &csa));
+ return (sys_cpuset_setaffinity(td, &csa));
}
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 82dd2ee..5f70765 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -533,7 +533,7 @@ linux_kill(struct thread *td, struct linux_kill_args *args)
tmp.signum = args->signum;
tmp.pid = args->pid;
- return (kill(td, &tmp));
+ return (sys_kill(td, &tmp));
}
static int
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 08728a1..7568c82 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -643,7 +643,7 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
if (bsd_args.domain == -1)
return (EAFNOSUPPORT);
- retval_socket = socket(td, &bsd_args);
+ retval_socket = sys_socket(td, &bsd_args);
if (retval_socket)
return (retval_socket);
@@ -774,7 +774,7 @@ linux_listen(struct thread *td, struct linux_listen_args *args)
bsd_args.s = args->s;
bsd_args.backlog = args->backlog;
- return (listen(td, &bsd_args));
+ return (sys_listen(td, &bsd_args));
}
static int
@@ -795,7 +795,7 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
/* XXX: */
bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr);
bsd_args.anamelen = PTRIN(namelen);/* XXX */
- error = accept(td, &bsd_args);
+ error = sys_accept(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.name);
if (error) {
if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
@@ -874,7 +874,7 @@ linux_getsockname(struct thread *td, struct linux_getsockname_args *args)
/* XXX: */
bsd_args.asa = (struct sockaddr * __restrict)PTRIN(args->addr);
bsd_args.alen = PTRIN(args->namelen); /* XXX */
- error = getsockname(td, &bsd_args);
+ error = sys_getsockname(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa);
if (error)
return (error);
@@ -903,7 +903,7 @@ linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
bsd_args.fdes = args->s;
bsd_args.asa = (struct sockaddr *)PTRIN(args->addr);
bsd_args.alen = (int *)PTRIN(args->namelen);
- error = getpeername(td, &bsd_args);
+ error = sys_getpeername(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa);
if (error)
return (error);
@@ -1001,7 +1001,7 @@ linux_send(struct thread *td, struct linux_send_args *args)
bsd_args.flags = args->flags;
bsd_args.to = NULL;
bsd_args.tolen = 0;
- return sendto(td, &bsd_args);
+ return sys_sendto(td, &bsd_args);
}
struct linux_recv_args {
@@ -1029,7 +1029,7 @@ linux_recv(struct thread *td, struct linux_recv_args *args)
bsd_args.flags = linux_to_bsd_msg_flags(args->flags);
bsd_args.from = NULL;
bsd_args.fromlenaddr = 0;
- return (recvfrom(td, &bsd_args));
+ return (sys_recvfrom(td, &bsd_args));
}
static int
@@ -1091,7 +1091,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args)
bsd_args.fromlenaddr = PTRIN(args->fromlen);/* XXX */
linux_to_bsd_sockaddr((struct sockaddr *)bsd_args.from, len);
- error = recvfrom(td, &bsd_args);
+ error = sys_recvfrom(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.from);
if (error)
@@ -1438,7 +1438,7 @@ linux_shutdown(struct thread *td, struct linux_shutdown_args *args)
bsd_args.s = args->s;
bsd_args.how = args->how;
- return (shutdown(td, &bsd_args));
+ return (sys_shutdown(td, &bsd_args));
}
struct linux_setsockopt_args {
@@ -1507,10 +1507,10 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args)
if (name == IPV6_NEXTHOP) {
linux_to_bsd_sockaddr((struct sockaddr *)bsd_args.val,
bsd_args.valsize);
- error = setsockopt(td, &bsd_args);
+ error = sys_setsockopt(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val);
} else
- error = setsockopt(td, &bsd_args);
+ error = sys_setsockopt(td, &bsd_args);
return (error);
}
@@ -1600,10 +1600,10 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args)
bsd_args.avalsize = PTRIN(args->optlen);
if (name == IPV6_NEXTHOP) {
- error = getsockopt(td, &bsd_args);
+ error = sys_getsockopt(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val);
} else
- error = getsockopt(td, &bsd_args);
+ error = sys_getsockopt(td, &bsd_args);
return (error);
}
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 6ad674b..708cad1 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -234,7 +234,7 @@ linux_getegid16(struct thread *td, struct linux_getegid16_args *args)
{
struct getegid_args bsd;
- return (getegid(td, &bsd));
+ return (sys_getegid(td, &bsd));
}
int
@@ -242,7 +242,7 @@ linux_geteuid16(struct thread *td, struct linux_geteuid16_args *args)
{
struct geteuid_args bsd;
- return (geteuid(td, &bsd));
+ return (sys_geteuid(td, &bsd));
}
int
@@ -251,7 +251,7 @@ linux_setgid16(struct thread *td, struct linux_setgid16_args *args)
struct setgid_args bsd;
bsd.gid = args->gid;
- return (setgid(td, &bsd));
+ return (sys_setgid(td, &bsd));
}
int
@@ -260,7 +260,7 @@ linux_setuid16(struct thread *td, struct linux_setuid16_args *args)
struct setuid_args bsd;
bsd.uid = args->uid;
- return (setuid(td, &bsd));
+ return (sys_setuid(td, &bsd));
}
int
@@ -270,7 +270,7 @@ linux_setregid16(struct thread *td, struct linux_setregid16_args *args)
bsd.rgid = CAST_NOCHG(args->rgid);
bsd.egid = CAST_NOCHG(args->egid);
- return (setregid(td, &bsd));
+ return (sys_setregid(td, &bsd));
}
int
@@ -280,7 +280,7 @@ linux_setreuid16(struct thread *td, struct linux_setreuid16_args *args)
bsd.ruid = CAST_NOCHG(args->ruid);
bsd.euid = CAST_NOCHG(args->euid);
- return (setreuid(td, &bsd));
+ return (sys_setreuid(td, &bsd));
}
int
@@ -291,7 +291,7 @@ linux_setresgid16(struct thread *td, struct linux_setresgid16_args *args)
bsd.rgid = CAST_NOCHG(args->rgid);
bsd.egid = CAST_NOCHG(args->egid);
bsd.sgid = CAST_NOCHG(args->sgid);
- return (setresgid(td, &bsd));
+ return (sys_setresgid(td, &bsd));
}
int
@@ -302,5 +302,5 @@ linux_setresuid16(struct thread *td, struct linux_setresuid16_args *args)
bsd.ruid = CAST_NOCHG(args->ruid);
bsd.euid = CAST_NOCHG(args->euid);
bsd.suid = CAST_NOCHG(args->suid);
- return (setresuid(td, &bsd));
+ return (sys_setresuid(td, &bsd));
}
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c
index ce1452a..cbca7e2 100644
--- a/sys/compat/svr4/svr4_fcntl.c
+++ b/sys/compat/svr4/svr4_fcntl.c
@@ -368,7 +368,7 @@ fd_truncate(td, fd, flp)
ft.fd = fd;
ft.length = start;
- error = ftruncate(td, &ft);
+ error = sys_ftruncate(td, &ft);
fdrop(fp, td);
return (error);
@@ -476,7 +476,7 @@ svr4_sys_llseek(td, uap)
#endif
ap.whence = uap->whence;
- return lseek(td, &ap);
+ return sys_lseek(td, &ap);
}
int
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c
index cb7cada..967169b 100644
--- a/sys/compat/svr4/svr4_filio.c
+++ b/sys/compat/svr4/svr4_filio.c
@@ -75,7 +75,7 @@ svr4_sys_poll(td, uap)
siz = uap->nfds * sizeof(struct pollfd);
pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK);
- error = poll(td, (struct poll_args *)uap);
+ error = sys_poll(td, (struct poll_args *)uap);
if ((cerr = copyin(uap->fds, pfd, siz)) != 0) {
error = cerr;
diff --git a/sys/compat/svr4/svr4_ipc.c b/sys/compat/svr4/svr4_ipc.c
index 658c6d6..f816cb0 100644
--- a/sys/compat/svr4/svr4_ipc.c
+++ b/sys/compat/svr4/svr4_ipc.c
@@ -292,7 +292,7 @@ svr4_semget(td, v)
ap.nsems = uap->nsems;
ap.semflg = uap->semflg;
- return semget(td, &ap);
+ return sys_semget(td, &ap);
}
struct svr4_sys_semop_args {
@@ -315,7 +315,7 @@ svr4_semop(td, v)
ap.sops = (struct sembuf *) uap->sops;
ap.nsops = uap->nsops;
- return semop(td, &ap);
+ return sys_semop(td, &ap);
}
int
@@ -400,7 +400,7 @@ svr4_msgsnd(td, v)
ap.msgsz = uap->msgsz;
ap.msgflg = uap->msgflg;
- return msgsnd(td, &ap);
+ return sys_msgsnd(td, &ap);
}
struct svr4_sys_msgrcv_args {
@@ -426,7 +426,7 @@ svr4_msgrcv(td, v)
ap.msgtyp = uap->msgtyp;
ap.msgflg = uap->msgflg;
- return msgrcv(td, &ap);
+ return sys_msgrcv(td, &ap);
}
struct svr4_sys_msgget_args {
@@ -446,7 +446,7 @@ svr4_msgget(td, v)
ap.key = uap->key;
ap.msgflg = uap->msgflg;
- return msgget(td, &ap);
+ return sys_msgget(td, &ap);
}
struct svr4_sys_msgctl_args {
@@ -569,7 +569,7 @@ svr4_shmat(td, v)
ap.shmaddr = uap->shmaddr;
ap.shmflg = uap->shmflg;
- return shmat(td, &ap);
+ return sys_shmat(td, &ap);
}
struct svr4_sys_shmdt_args {
@@ -587,7 +587,7 @@ svr4_shmdt(td, v)
ap.shmaddr = uap->shmaddr;
- return shmdt(td, &ap);
+ return sys_shmdt(td, &ap);
}
struct svr4_sys_shmget_args {
@@ -609,7 +609,7 @@ svr4_shmget(td, v)
ap.size = uap->size;
ap.shmflg = uap->shmflg;
- return shmget(td, &ap);
+ return sys_shmget(td, &ap);
}
struct svr4_sys_shmctl_args {
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index c0a7478..8456e10 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -569,7 +569,7 @@ svr4_sys_mmap(td, uap)
mm.addr = uap->addr;
mm.pos = uap->pos;
- return mmap(td, &mm);
+ return sys_mmap(td, &mm);
}
int
@@ -602,7 +602,7 @@ svr4_sys_mmap64(td, uap)
mm.addr != 0 && (void *)mm.addr < rp)
mm.addr = rp;
- return mmap(td, &mm);
+ return sys_mmap(td, &mm);
}
@@ -844,7 +844,7 @@ svr4_sys_break(td, uap)
struct obreak_args ap;
ap.nsize = uap->nsize;
- return (obreak(td, &ap));
+ return (sys_obreak(td, &ap));
}
static __inline clock_t
@@ -990,7 +990,7 @@ svr4_sys_pgrpsys(td, uap)
* setsid() for SVR4. (Under BSD, the difference is that
* a setpgid(0,0) will not create a new session.)
*/
- setsid(td, NULL);
+ sys_setsid(td, NULL);
/*FALLTHROUGH*/
case 0: /* getpgrp() */
@@ -1013,7 +1013,7 @@ svr4_sys_pgrpsys(td, uap)
return 0;
case 3: /* setsid() */
- return setsid(td, NULL);
+ return sys_setsid(td, NULL);
case 4: /* getpgid(pid) */
@@ -1032,7 +1032,7 @@ svr4_sys_pgrpsys(td, uap)
sa.pid = uap->pid;
sa.pgid = uap->pgid;
- return setpgid(td, &sa);
+ return sys_setpgid(td, &sa);
}
default:
@@ -1598,7 +1598,7 @@ svr4_sys_memcntl(td, uap)
msa.len = uap->len;
msa.flags = (int)uap->arg;
- return msync(td, &msa);
+ return sys_msync(td, &msa);
}
case SVR4_MC_ADVISE:
{
@@ -1608,7 +1608,7 @@ svr4_sys_memcntl(td, uap)
maa.len = uap->len;
maa.behav = (int)uap->arg;
- return madvise(td, &maa);
+ return sys_madvise(td, &maa);
}
case SVR4_MC_LOCK:
case SVR4_MC_UNLOCK:
@@ -1633,11 +1633,11 @@ svr4_sys_nice(td, uap)
ap.who = 0;
ap.prio = uap->prio;
- if ((error = setpriority(td, &ap)) != 0)
+ if ((error = sys_setpriority(td, &ap)) != 0)
return error;
/* the cast is stupid, but the structures are the same */
- if ((error = getpriority(td, (struct getpriority_args *)&ap)) != 0)
+ if ((error = sys_getpriority(td, (struct getpriority_args *)&ap)) != 0)
return error;
return 0;
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index 0034abd..3791c05 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -519,7 +519,7 @@ svr4_sys_kill(td, uap)
return (EINVAL);
ka.pid = uap->pid;
ka.signum = SVR4_SVR42BSD_SIG(uap->signum);
- return kill(td, &ka);
+ return sys_kill(td, &ka);
}
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c
index 3f3d7c5..038267c 100644
--- a/sys/compat/svr4/svr4_socket.c
+++ b/sys/compat/svr4/svr4_socket.c
@@ -238,5 +238,5 @@ svr4_sys_socket(td, uap)
default:
return EINVAL;
}
- return socket(td, (struct socket_args *)uap);
+ return sys_socket(td, (struct socket_args *)uap);
}
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index cc84396..b686642 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -694,6 +694,6 @@ svr4_sys_fpathconf(td, uap)
*retval = 0;
return 0;
default:
- return fpathconf(td, (struct fpathconf_args *)uap);
+ return sys_fpathconf(td, (struct fpathconf_args *)uap);
}
}
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index a1a42c0..27014e3 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -523,7 +523,7 @@ si_listen(fp, fd, ioc, td)
DPRINTF(("SI_LISTEN: fileno %d backlog = %d\n", fd, 5));
la.backlog = 5;
- if ((error = listen(td, &la)) != 0) {
+ if ((error = sys_listen(td, &la)) != 0) {
DPRINTF(("SI_LISTEN: listen failed %d\n", error));
return error;
}
@@ -637,7 +637,7 @@ si_shutdown(fp, fd, ioc, td)
ap.s = fd;
- return shutdown(td, &ap);
+ return sys_shutdown(td, &ap);
}
@@ -1056,7 +1056,7 @@ i_fdinsert(fp, td, retval, fd, cmd, dat)
d2p.from = st->s_afd;
d2p.to = fdi.fd;
- if ((error = dup2(td, &d2p)) != 0) {
+ if ((error = sys_dup2(td, &d2p)) != 0) {
DPRINTF(("fdinsert: dup2(%d, %d) failed %d\n",
st->s_afd, fdi.fd, error));
mtx_unlock(&Giant);
@@ -1099,7 +1099,7 @@ _i_bind_rsvd(fp, td, retval, fd, cmd, dat)
ap.path = dat;
ap.mode = S_IFIFO;
- return mkfifo(td, &ap);
+ return sys_mkfifo(td, &ap);
}
static int
@@ -1119,7 +1119,7 @@ _i_rele_rsvd(fp, td, retval, fd, cmd, dat)
*/
ap.path = dat;
- return unlink(td, &ap);
+ return sys_unlink(td, &ap);
}
static int
@@ -1539,7 +1539,7 @@ svr4_do_putmsg(td, uap, fp)
wa.fd = uap->fd;
wa.buf = dat.buf;
wa.nbyte = dat.len;
- return write(td, &wa);
+ return sys_write(td, &wa);
}
DPRINTF(("putmsg: Invalid inet length %ld\n", sc.len));
return EINVAL;
@@ -1926,7 +1926,7 @@ svr4_do_getmsg(td, uap, fp)
ra.fd = uap->fd;
ra.buf = dat.buf;
ra.nbyte = dat.maxlen;
- if ((error = read(td, &ra)) != 0) {
+ if ((error = sys_read(td, &ra)) != 0) {
mtx_unlock(&Giant);
return error;
}
@@ -1995,7 +1995,7 @@ int svr4_sys_send(td, uap)
sta.to = NULL;
sta.tolen = 0;
- return (sendto(td, &sta));
+ return (sys_sendto(td, &sta));
}
int svr4_sys_recv(td, uap)
@@ -2011,7 +2011,7 @@ int svr4_sys_recv(td, uap)
rfa.from = NULL;
rfa.fromlenaddr = NULL;
- return (recvfrom(td, &rfa));
+ return (sys_recvfrom(td, &rfa));
}
/*
@@ -2033,6 +2033,6 @@ svr4_sys_sendto(td, uap)
sa.tolen = uap->tolen;
DPRINTF(("calling sendto()\n"));
- return sendto(td, &sa);
+ return sys_sendto(td, &sa);
}
OpenPOWER on IntegriCloud