working on it
This commit is contained in:
parent
56a6e78765
commit
35a88970c2
1094 changed files with 51093 additions and 51 deletions
7
05/musl-final/src/stat/chmod.c
Normal file
7
05/musl-final/src/stat/chmod.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int chmod(const char *path, mode_t mode)
|
||||
{
|
||||
return syscall2(__NR_chmod, (long)path, mode);
|
||||
}
|
7
05/musl-final/src/stat/fchmod.c
Normal file
7
05/musl-final/src/stat/fchmod.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int fchmod(int fd, mode_t mode)
|
||||
{
|
||||
return syscall2(__NR_fchmod, fd, mode);
|
||||
}
|
7
05/musl-final/src/stat/fchmodat.c
Normal file
7
05/musl-final/src/stat/fchmodat.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int fchmodat(int fd, const char *path, mode_t mode, int flag)
|
||||
{
|
||||
return syscall4(__NR_fchmodat, fd, (long)path, mode, flag);
|
||||
}
|
10
05/musl-final/src/stat/fstat.c
Normal file
10
05/musl-final/src/stat/fstat.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int fstat(int fd, struct stat *buf)
|
||||
{
|
||||
return syscall2(__NR_fstat, fd, (long)buf);
|
||||
}
|
||||
|
||||
LFS64(fstat);
|
10
05/musl-final/src/stat/fstatat.c
Normal file
10
05/musl-final/src/stat/fstatat.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int fstatat(int fd, const char *path, struct stat *buf, int flag)
|
||||
{
|
||||
return syscall4(__NR_fstatat, fd, (long)path, (long)buf, flag);
|
||||
}
|
||||
|
||||
LFS64(fstatat);
|
13
05/musl-final/src/stat/fstatvfs.c
Normal file
13
05/musl-final/src/stat/fstatvfs.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <sys/statvfs.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int fstatvfs(int fd, struct statvfs *buf)
|
||||
{
|
||||
return syscall2(__NR_fstatfs, fd, (long)buf);
|
||||
}
|
||||
|
||||
weak_alias(fstatvfs, fstatfs);
|
||||
|
||||
LFS64(fstatvfs);
|
||||
LFS64(fstatfs);
|
10
05/musl-final/src/stat/lstat.c
Normal file
10
05/musl-final/src/stat/lstat.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int lstat(const char *path, struct stat *buf)
|
||||
{
|
||||
return syscall2(__NR_lstat, (long)path, (long)buf);
|
||||
}
|
||||
|
||||
LFS64(lstat);
|
7
05/musl-final/src/stat/mkdir.c
Normal file
7
05/musl-final/src/stat/mkdir.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int mkdir(const char *path, mode_t mode)
|
||||
{
|
||||
return syscall2(__NR_mkdir, (long)path, mode);
|
||||
}
|
7
05/musl-final/src/stat/mkdirat.c
Normal file
7
05/musl-final/src/stat/mkdirat.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int mkdirat(int fd, const char *path, mode_t mode)
|
||||
{
|
||||
return syscall3(__NR_mkdirat, fd, (long)path, mode);
|
||||
}
|
6
05/musl-final/src/stat/mkfifo.c
Normal file
6
05/musl-final/src/stat/mkfifo.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
int mkfifo(const char *path, mode_t mode)
|
||||
{
|
||||
return mknod(path, mode | S_IFIFO, 0);
|
||||
}
|
6
05/musl-final/src/stat/mkfifoat.c
Normal file
6
05/musl-final/src/stat/mkfifoat.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
int mkfifoat(int fd, const char *path, mode_t mode)
|
||||
{
|
||||
return mknodat(fd, path, mode | S_IFIFO, 0);
|
||||
}
|
10
05/musl-final/src/stat/mknod.c
Normal file
10
05/musl-final/src/stat/mknod.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
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);
|
||||
}
|
7
05/musl-final/src/stat/mknodat.c
Normal file
7
05/musl-final/src/stat/mknodat.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int mknodat(int fd, const char *path, mode_t mode, dev_t dev)
|
||||
{
|
||||
return syscall4(__NR_mknodat, fd, (long)path, mode, dev & 0xffff);
|
||||
}
|
10
05/musl-final/src/stat/stat.c
Normal file
10
05/musl-final/src/stat/stat.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int stat(const char *path, struct stat *buf)
|
||||
{
|
||||
return syscall2(__NR_stat, (long)path, (long)buf);
|
||||
}
|
||||
|
||||
LFS64(stat);
|
13
05/musl-final/src/stat/statvfs.c
Normal file
13
05/musl-final/src/stat/statvfs.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <sys/statvfs.h>
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
int statvfs(const char *path, struct statvfs *buf)
|
||||
{
|
||||
return syscall2(__NR_statfs, (long)path, (long)buf);
|
||||
}
|
||||
|
||||
weak_alias(statvfs, statfs);
|
||||
|
||||
LFS64(statvfs);
|
||||
LFS64(statfs);
|
7
05/musl-final/src/stat/umask.c
Normal file
7
05/musl-final/src/stat/umask.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include "syscall.h"
|
||||
|
||||
mode_t umask(mode_t mode)
|
||||
{
|
||||
return syscall1(__NR_umask, mode);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue