global cleanup to use the new syscall interface
This commit is contained in:
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
int brk(void *end)
|
||||
{
|
||||
return -(syscall1(__NR_brk, (long)end) == -1);
|
||||
return -(syscall(SYS_brk, end) == -1);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int chroot(const char *path)
|
||||
{
|
||||
return syscall1(__NR_chroot, (long)path);
|
||||
return syscall(SYS_chroot, path);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int epoll_create(int size)
|
||||
{
|
||||
return syscall1(__NR_epoll_create, size);
|
||||
return syscall(SYS_epoll_create, size);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int epoll_create1(int flags)
|
||||
{
|
||||
return syscall1(__NR_epoll_create1, flags);
|
||||
return syscall(SYS_epoll_create1, flags);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev)
|
||||
{
|
||||
return syscall4(__NR_epoll_ctl, fd, op, fd2, (long)ev);
|
||||
return syscall(SYS_epoll_ctl, fd, op, fd2, ev);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs)
|
||||
{
|
||||
return syscall6(__NR_epoll_pwait, fd, (long)ev, cnt, to, (long)sigs, 8);
|
||||
return syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, 8);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int epoll_wait(int fd, struct epoll_event *ev, int cnt, int to)
|
||||
{
|
||||
return syscall4(__NR_epoll_wait, fd, (long)ev, cnt, to);
|
||||
return syscall(SYS_epoll_wait, fd, ev, cnt, to);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int inotify_add_watch(int fd, const char *pathname, uint32_t mask)
|
||||
{
|
||||
return syscall3(__NR_inotify_add_watch, fd, (long)pathname, mask);
|
||||
return syscall(SYS_inotify_add_watch, fd, pathname, mask);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int inotify_init()
|
||||
{
|
||||
return syscall0(__NR_inotify_init);
|
||||
return syscall(SYS_inotify_init);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int inotify_init1(int flags)
|
||||
{
|
||||
return syscall1(__NR_inotify_init1, flags);
|
||||
return syscall(SYS_inotify_init1, flags);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int inotify_rm_watch(int fd, uint32_t wd)
|
||||
{
|
||||
return syscall2(__NR_inotify_rm_watch, fd, wd);
|
||||
return syscall(SYS_inotify_rm_watch, fd, wd);
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
int klogctl (int type, char *buf, int len)
|
||||
{
|
||||
return syscall3(__NR_syslog, type, (long)buf, len);
|
||||
return syscall(SYS_syslog, type, buf, len);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int mount(const char *special, const char *dir, const char *fstype, unsigned long flags, const void *data)
|
||||
{
|
||||
return syscall5(__NR_mount, (long)special, (long)dir, (long)fstype, flags, (long)data);
|
||||
return syscall(SYS_mount, special, dir, fstype, flags, data);
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@ int prctl(int op, ...)
|
||||
va_list ap;
|
||||
va_start(ap, op);
|
||||
for (i=0; i<4; i++) x[i] = va_arg(ap, unsigned long);
|
||||
return syscall5(__NR_prctl, op, x[0], x[1], x[2], x[3]);
|
||||
return syscall(SYS_prctl, op, x[0], x[1], x[2], x[3]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
void *sbrk(ptrdiff_t inc)
|
||||
{
|
||||
return (void *)syscall1(__NR_brk, syscall1(__NR_brk, 0)+inc);
|
||||
return (void *)syscall(SYS_brk, syscall(SYS_brk, 0)+inc);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count)
|
||||
{
|
||||
return syscall4(__NR_sendfile, out_fd, in_fd, (long)ofs, count);
|
||||
return syscall(SYS_sendfile, out_fd, in_fd, ofs, count);
|
||||
}
|
||||
|
||||
LFS64(sendfile);
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int setgroups(int count, const gid_t list[])
|
||||
{
|
||||
return syscall2(__NR_setgroups, count, (long)list);
|
||||
return syscall(SYS_setgroups, count, list);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int sethostname(const char *name, size_t len)
|
||||
{
|
||||
return syscall2(__NR_sethostname, (long)name, len);
|
||||
return syscall(SYS_sethostname, name, len);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int settimeofday(const struct timeval *tv, void *tz)
|
||||
{
|
||||
return syscall2(__NR_settimeofday, (long)tv, 0);
|
||||
return syscall(SYS_settimeofday, tv, 0);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
int signalfd(int fd, const sigset_t *sigs, int flags)
|
||||
{
|
||||
return syscall3(__NR_signalfd, fd, (long)sigs, 8);
|
||||
return syscall(SYS_signalfd, fd, sigs, 8);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int swapoff(const char *path)
|
||||
{
|
||||
return syscall1(__NR_swapoff, (long)path);
|
||||
return syscall(SYS_swapoff, path);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int swapon(const char *path, int flags)
|
||||
{
|
||||
return syscall2(__NR_swapon, (long)path, flags);
|
||||
return syscall(SYS_swapon, path, flags);
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,5 +4,5 @@ struct sysinfo;
|
||||
|
||||
int sysinfo(struct sysinfo *info)
|
||||
{
|
||||
return syscall1(__NR_sysinfo, (long)info);
|
||||
return syscall(SYS_sysinfo, info);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int umount(const char *special)
|
||||
{
|
||||
return syscall2(__NR_umount2, (long)special, 0);
|
||||
return syscall(SYS_umount2, special, 0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
|
||||
int umount2(const char *special, int flags)
|
||||
{
|
||||
return syscall2(__NR_umount2, (long)special, flags);
|
||||
return syscall(SYS_umount2, special, flags);
|
||||
}
|
||||
|
||||
+1
-6
@@ -3,10 +3,5 @@
|
||||
|
||||
int utimes(const char *path, const struct timeval times[2])
|
||||
{
|
||||
long ktimes[2];
|
||||
if (times) {
|
||||
ktimes[0] = times[0].tv_sec;
|
||||
ktimes[1] = times[1].tv_sec;
|
||||
}
|
||||
return syscall2(__NR_utime, (long)path, times ? (long)ktimes : 0);
|
||||
return syscall(SYS_utime, path, times);
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@
|
||||
|
||||
pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)
|
||||
{
|
||||
return syscall4(__NR_wait4, pid, (long)status, options, (long)usage);
|
||||
return syscall(SYS_wait4, pid, status, options, usage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user