global cleanup to use the new syscall interface

This commit is contained in:
Rich Felker 2011-03-20 00:16:43 -04:00
commit aa398f56fa
160 changed files with 180 additions and 238 deletions

View file

@ -3,5 +3,5 @@
int chmod(const char *path, mode_t mode)
{
return syscall2(__NR_chmod, (long)path, mode);
return syscall(SYS_chmod, path, mode);
}

View file

@ -3,5 +3,5 @@
int fchmod(int fd, mode_t mode)
{
return syscall2(__NR_fchmod, fd, mode);
return syscall(SYS_fchmod, fd, mode);
}

View file

@ -3,5 +3,5 @@
int fchmodat(int fd, const char *path, mode_t mode, int flag)
{
return syscall4(__NR_fchmodat, fd, (long)path, mode, flag);
return syscall(SYS_fchmodat, fd, path, mode, flag);
}

View file

@ -4,7 +4,7 @@
int fstat(int fd, struct stat *buf)
{
return syscall2(__NR_fstat, fd, (long)buf);
return syscall(SYS_fstat, fd, buf);
}
LFS64(fstat);

View file

@ -4,7 +4,7 @@
int fstatat(int fd, const char *path, struct stat *buf, int flag)
{
return syscall4(__NR_fstatat, fd, (long)path, (long)buf, flag);
return syscall(SYS_fstatat, fd, path, buf, flag);
}
LFS64(fstatat);

View file

@ -4,7 +4,7 @@
int fstatvfs(int fd, struct statvfs *buf)
{
return syscall2(__NR_fstatfs, fd, (long)buf);
return syscall(SYS_fstatfs, fd, buf);
}
weak_alias(fstatvfs, fstatfs);

View file

@ -4,7 +4,7 @@
int lstat(const char *path, struct stat *buf)
{
return syscall2(__NR_lstat, (long)path, (long)buf);
return syscall(SYS_lstat, path, buf);
}
LFS64(lstat);

View file

@ -3,5 +3,5 @@
int mkdir(const char *path, mode_t mode)
{
return syscall2(__NR_mkdir, (long)path, mode);
return syscall(SYS_mkdir, path, mode);
}

View file

@ -3,5 +3,5 @@
int mkdirat(int fd, const char *path, mode_t mode)
{
return syscall3(__NR_mkdirat, fd, (long)path, mode);
return syscall(SYS_mkdirat, fd, path, mode);
}

View file

@ -6,5 +6,5 @@ int mknod(const char *path, mode_t mode, dev_t dev)
/* since dev_t is system-specific anyway we defer to the idiotic
* legacy-compatible bitfield mapping of the type.. at least we've
* made it large enough to leave space for future expansion.. */
return syscall3(__NR_mknod, (long)path, mode, dev & 0xffff);
return syscall(SYS_mknod, path, mode, dev & 0xffff);
}

View file

@ -3,5 +3,5 @@
int mknodat(int fd, const char *path, mode_t mode, dev_t dev)
{
return syscall4(__NR_mknodat, fd, (long)path, mode, dev & 0xffff);
return syscall(SYS_mknodat, fd, path, mode, dev & 0xffff);
}

View file

@ -4,7 +4,7 @@
int stat(const char *path, struct stat *buf)
{
return syscall2(__NR_stat, (long)path, (long)buf);
return syscall(SYS_stat, path, buf);
}
LFS64(stat);

View file

@ -4,7 +4,7 @@
int statvfs(const char *path, struct statvfs *buf)
{
return syscall2(__NR_statfs, (long)path, (long)buf);
return syscall(SYS_statfs, path, buf);
}
weak_alias(statvfs, statfs);

View file

@ -3,5 +3,5 @@
mode_t umask(mode_t mode)
{
return syscall1(__NR_umask, mode);
return syscall(SYS_umask, mode);
}

View file

@ -3,5 +3,5 @@
int utimensat(int fd, const char *path, const struct timespec times[2], int flags)
{
return syscall4(__NR_utimensat, fd, (long)path, (long)times, flags);
return syscall(SYS_utimensat, fd, path, times, flags);
}