|
@@ -27,338 +27,342 @@
|
|
|
#include <sys/syscall.h>
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L__exit
|
|
|
|
|
|
* _exit returning. It really doesn't return... */
|
|
|
#define __NR__exit __NR_exit
|
|
|
-_syscall1(void,_exit,int,status);
|
|
|
+_syscall1(void, _exit, int, status);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_fork
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(pid_t,fork);
|
|
|
+_syscall0(pid_t, fork);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_read
|
|
|
+
|
|
|
+#ifdef L_read
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(size_t,read,int,fd,char *,buf,size_t,count);
|
|
|
+_syscall3(size_t, read, int, fd, char *, buf, size_t, count);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_write
|
|
|
+
|
|
|
+#ifdef L_write
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(size_t,write,int,fd,const char *,buf,size_t,count);
|
|
|
+_syscall3(size_t, write, int, fd, const char *, buf, size_t, count);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L___open
|
|
|
+
|
|
|
+#ifdef L___open
|
|
|
#include <stdarg.h>
|
|
|
#include <fcntl.h>
|
|
|
#define __NR___open __NR_open
|
|
|
-_syscall3(int,__open,const char *,fn,int,flags,mode_t,mode);
|
|
|
+_syscall3(int, __open, const char *, fn, int, flags, mode_t, mode);
|
|
|
|
|
|
-int open (const char *file, int oflag, ...)
|
|
|
+int open(const char *file, int oflag, ...)
|
|
|
{
|
|
|
- int mode=0;
|
|
|
- if (oflag & O_CREAT)
|
|
|
- {
|
|
|
+ int mode = 0;
|
|
|
+
|
|
|
+ if (oflag & O_CREAT) {
|
|
|
va_list args;
|
|
|
+
|
|
|
va_start(args, oflag);
|
|
|
mode = va_arg(args, int);
|
|
|
+
|
|
|
va_end(args);
|
|
|
}
|
|
|
|
|
|
- return __open(file, oflag, mode);
|
|
|
+ return __open(file, oflag, mode);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_close
|
|
|
+
|
|
|
+#ifdef L_close
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,close,int,fd);
|
|
|
+_syscall1(int, close, int, fd);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#include <sys/wait.h>
|
|
|
#ifdef L_waitpid
|
|
|
-_syscall3(pid_t,waitpid,pid_t,pid,int *,status,int,options);
|
|
|
+_syscall3(pid_t, waitpid, pid_t, pid, int *, status, int, options);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_creat
|
|
|
+
|
|
|
+#ifdef L_creat
|
|
|
#include <fcntl.h>
|
|
|
-_syscall2(int,creat,const char *,file,mode_t,mode);
|
|
|
+_syscall2(int, creat, const char *, file, mode_t, mode);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_link
|
|
|
+
|
|
|
+#ifdef L_link
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,link,const char *,oldpath,const char *,newpath);
|
|
|
+_syscall2(int, link, const char *, oldpath, const char *, newpath);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_unlink
|
|
|
+
|
|
|
+#ifdef L_unlink
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,unlink,const char *,pathname);
|
|
|
+_syscall1(int, unlink, const char *, pathname);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_execve
|
|
|
+
|
|
|
+#ifdef L_execve
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,execve,const char *,filename, char *const *, argv, char *const *, envp);
|
|
|
+_syscall3(int, execve, const char *, filename, char *const *, argv,
|
|
|
+ char *const *, envp);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_chdir
|
|
|
+
|
|
|
+#ifdef L_chdir
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,chdir,const char *,path);
|
|
|
+_syscall1(int, chdir, const char *, path);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_time
|
|
|
+
|
|
|
+#ifdef L_time
|
|
|
#include <time.h>
|
|
|
-_syscall1(time_t,time,time_t *,t);
|
|
|
+_syscall1(time_t, time, time_t *, t);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_mknod
|
|
|
+
|
|
|
+#ifdef L_mknod
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,mknod,const char *,pathname, mode_t, mode, dev_t, dev);
|
|
|
+_syscall3(int, mknod, const char *, pathname, mode_t, mode, dev_t, dev);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_chmod
|
|
|
+
|
|
|
+#ifdef L_chmod
|
|
|
#include <sys/stat.h>
|
|
|
-_syscall2(int, chmod,const char *,path, mode_t,mode);
|
|
|
+_syscall2(int, chmod, const char *, path, mode_t, mode);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_lchown
|
|
|
+
|
|
|
+#ifdef L_lchown
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,lchown,const char *,path, uid_t,owner, gid_t,group);
|
|
|
+_syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_lseek
|
|
|
+
|
|
|
+#ifdef L_lseek
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(off_t,lseek,int,fildes, off_t,offset, int,whence);
|
|
|
+_syscall3(off_t, lseek, int, fildes, off_t, offset, int, whence);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getpid
|
|
|
+
|
|
|
+#ifdef L_getpid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(pid_t,getpid);
|
|
|
+_syscall0(pid_t, getpid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_mount
|
|
|
+
|
|
|
+#ifdef L_mount
|
|
|
#include <sys/mount.h>
|
|
|
-_syscall5(int,mount,const char *,specialfile,const char *,dir,
|
|
|
- const char *,filesystemtype, unsigned long,rwflag,
|
|
|
- const void *,data);
|
|
|
+_syscall5(int, mount, const char *, specialfile, const char *, dir,
|
|
|
+ const char *, filesystemtype, unsigned long, rwflag,
|
|
|
+ const void *, data);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_umount
|
|
|
+
|
|
|
+#ifdef L_umount
|
|
|
#include <sys/mount.h>
|
|
|
-_syscall1(int,umount,const char *,specialfile);
|
|
|
+_syscall1(int, umount, const char *, specialfile);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setuid
|
|
|
+
|
|
|
+#ifdef L_setuid
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,setuid,uid_t,uid);
|
|
|
+_syscall1(int, setuid, uid_t, uid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getuid
|
|
|
+
|
|
|
+#ifdef L_getuid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(gid_t,getuid);
|
|
|
+_syscall0(gid_t, getuid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_stime
|
|
|
#include <time.h>
|
|
|
-_syscall1(int,stime,time_t *,t);
|
|
|
+_syscall1(int, stime, time_t *, t);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_alarm
|
|
|
+
|
|
|
+#ifdef L_alarm
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(unsigned int,alarm,unsigned int,seconds);
|
|
|
+_syscall1(unsigned int, alarm, unsigned int, seconds);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_pause
|
|
|
+
|
|
|
+#ifdef L_pause
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(int,pause);
|
|
|
+_syscall0(int, pause);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_utime
|
|
|
+
|
|
|
+#ifdef L_utime
|
|
|
#include <utime.h>
|
|
|
-_syscall2(int,utime,const char *,filename, struct utimbuf *,buf);
|
|
|
+_syscall2(int, utime, const char *, filename, struct utimbuf *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_access
|
|
|
+
|
|
|
+#ifdef L_access
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,access,const char *,pathname, int,mode);
|
|
|
+_syscall2(int, access, const char *, pathname, int, mode);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_nice
|
|
|
+
|
|
|
+#ifdef L_nice
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,nice,int,inc);
|
|
|
+_syscall1(int, nice, int, inc);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sync
|
|
|
+
|
|
|
+#ifdef L_sync
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(int,sync);
|
|
|
+_syscall0(int, sync);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_kill
|
|
|
+
|
|
|
+#ifdef L_kill
|
|
|
#include <signal.h>
|
|
|
-_syscall2(int,kill,pid_t,pid,int,sig);
|
|
|
+_syscall2(int, kill, pid_t, pid, int, sig);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_rename
|
|
|
+
|
|
|
+#ifdef L_rename
|
|
|
#include <stdio.h>
|
|
|
-_syscall2(int,rename,const char *,oldpath, const char *,newpath);
|
|
|
+_syscall2(int, rename, const char *, oldpath, const char *, newpath);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_mkdir
|
|
|
+
|
|
|
+#ifdef L_mkdir
|
|
|
#include <sys/stat.h>
|
|
|
-_syscall2(int,mkdir,const char *,pathname, mode_t,mode);
|
|
|
+_syscall2(int, mkdir, const char *, pathname, mode_t, mode);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_rmdir
|
|
|
+
|
|
|
+#ifdef L_rmdir
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,rmdir,const char *,pathname);
|
|
|
+_syscall1(int, rmdir, const char *, pathname);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_dup
|
|
|
+
|
|
|
+#ifdef L_dup
|
|
|
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,dup,int,oldfd);
|
|
|
+_syscall1(int, dup, int, oldfd);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_pipe
|
|
|
+
|
|
|
+#ifdef L_pipe
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,pipe,int*,filedes);
|
|
|
+_syscall1(int, pipe, int *, filedes);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_times
|
|
|
+
|
|
|
+#ifdef L_times
|
|
|
#include <sys/times.h>
|
|
|
-_syscall1(clock_t,times,struct tms *,buf);
|
|
|
+_syscall1(clock_t, times, struct tms *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setgid
|
|
|
+
|
|
|
+#ifdef L_setgid
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,setgid,gid_t,gid);
|
|
|
+_syscall1(int, setgid, gid_t, gid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getgid
|
|
|
+
|
|
|
+#ifdef L_getgid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(gid_t,getgid);
|
|
|
+_syscall0(gid_t, getgid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_geteuid
|
|
|
#ifdef SYS_geteuid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(uid_t,geteuid);
|
|
|
+_syscall0(uid_t, geteuid);
|
|
|
#else
|
|
|
uid_t geteuid(void)
|
|
|
{
|
|
|
- return(getuid());
|
|
|
+ return (getuid());
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_getegid
|
|
|
#ifdef SYS_getegid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(gid_t,getegid);
|
|
|
+_syscall0(gid_t, getegid);
|
|
|
#else
|
|
|
gid_t getegid(void)
|
|
|
{
|
|
|
- return(getgid());
|
|
|
+ return (getgid());
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_umount2
|
|
|
#include <sys/mount.h>
|
|
|
-_syscall2(int,umount2,const char *,special_file,int,flags);
|
|
|
+_syscall2(int, umount2, const char *, special_file, int, flags);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L__ioctl
|
|
|
+
|
|
|
+#ifdef L__ioctl
|
|
|
#include <stdarg.h>
|
|
|
#include <sys/ioctl.h>
|
|
|
#define __NR__ioctl __NR_ioctl
|
|
|
-_syscall3(int,_ioctl,int,fd,int,request,void *,arg);
|
|
|
+_syscall3(int, _ioctl, int, fd, int, request, void *, arg);
|
|
|
|
|
|
-int ioctl (int fd, unsigned long int request, ...)
|
|
|
+int ioctl(int fd, unsigned long int request, ...)
|
|
|
{
|
|
|
- void * arg;
|
|
|
+ void *arg;
|
|
|
va_list list;
|
|
|
|
|
|
va_start(list, request);
|
|
|
arg = va_arg(list, void *);
|
|
|
+
|
|
|
va_end(list);
|
|
|
return _ioctl(fd, request, arg);
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L__fcntl
|
|
|
+
|
|
|
+#ifdef L__fcntl
|
|
|
#include <stdarg.h>
|
|
|
#include <fcntl.h>
|
|
|
#define __NR__fcntl __NR_fcntl
|
|
|
-_syscall3(int,_fcntl,int,fd,int,cmd,long,arg);
|
|
|
+_syscall3(int, _fcntl, int, fd, int, cmd, long, arg);
|
|
|
|
|
|
int fcntl(int fd, int command, ...)
|
|
|
{
|
|
@@ -367,670 +371,690 @@ int fcntl(int fd, int command, ...)
|
|
|
|
|
|
va_start(list, command);
|
|
|
arg = va_arg(list, long);
|
|
|
+
|
|
|
va_end(list);
|
|
|
return _fcntl(fd, command, arg);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setpgid
|
|
|
+
|
|
|
+#ifdef L_setpgid
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,setpgid,pid_t,pid,pid_t,pgid);
|
|
|
+_syscall2(int, setpgid, pid_t, pid, pid_t, pgid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_umask
|
|
|
+
|
|
|
+#ifdef L_umask
|
|
|
#include <sys/stat.h>
|
|
|
-_syscall1(mode_t,umask,mode_t,mask);
|
|
|
+_syscall1(mode_t, umask, mode_t, mask);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_chroot
|
|
|
+
|
|
|
+#ifdef L_chroot
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,chroot,const char *,path);
|
|
|
+_syscall1(int, chroot, const char *, path);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_dup2
|
|
|
+
|
|
|
+#ifdef L_dup2
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,dup2,int,oldfd,int,newfd);
|
|
|
+_syscall2(int, dup2, int, oldfd, int, newfd);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_getppid
|
|
|
#include <unistd.h>
|
|
|
#ifdef SYS_getppid
|
|
|
-_syscall0(pid_t,getppid);
|
|
|
+_syscall0(pid_t, getppid);
|
|
|
#else
|
|
|
pid_t getppid(void)
|
|
|
{
|
|
|
- return(getpid());
|
|
|
+ return (getpid());
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getpgrp
|
|
|
+
|
|
|
+#ifdef L_getpgrp
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(pid_t,getpgrp);
|
|
|
+_syscall0(pid_t, getpgrp);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setsid
|
|
|
+
|
|
|
+#ifdef L_setsid
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(pid_t,setsid);
|
|
|
+_syscall0(pid_t, setsid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sigaction
|
|
|
+
|
|
|
+#ifdef L_sigaction
|
|
|
#include <signal.h>
|
|
|
-_syscall3(int,sigaction,int,signum, const struct sigaction *,act, struct sigaction *,oldact);
|
|
|
+_syscall3(int, sigaction, int, signum, const struct sigaction *, act,
|
|
|
+ struct sigaction *, oldact);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setreuid
|
|
|
+
|
|
|
+#ifdef L_setreuid
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,setreuid,uid_t,ruid,uid_t,euid);
|
|
|
+_syscall2(int, setreuid, uid_t, ruid, uid_t, euid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setregid
|
|
|
+
|
|
|
+#ifdef L_setregid
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,setregid,gid_t,rgid,gid_t,egid);
|
|
|
+_syscall2(int, setregid, gid_t, rgid, gid_t, egid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_sigsuspend
|
|
|
#include <signal.h>
|
|
|
-_syscall1(int,sigsuspend,const sigset_t *,mask);
|
|
|
+_syscall1(int, sigsuspend, const sigset_t *, mask);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sigpending
|
|
|
+
|
|
|
+#ifdef L_sigpending
|
|
|
#include <signal.h>
|
|
|
-_syscall1(int,sigpending,sigset_t *,set);
|
|
|
+_syscall1(int, sigpending, sigset_t *, set);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sethostname
|
|
|
+
|
|
|
+#ifdef L_sethostname
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,sethostname,const char *,name, size_t,len);
|
|
|
+_syscall2(int, sethostname, const char *, name, size_t, len);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setrlimit
|
|
|
+
|
|
|
+#ifdef L_setrlimit
|
|
|
#include <unistd.h>
|
|
|
#include <sys/resource.h>
|
|
|
-_syscall2(int,setrlimit,int,resource,const struct rlimit *,rlim);
|
|
|
+_syscall2(int, setrlimit, int, resource, const struct rlimit *, rlim);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getrlimit
|
|
|
+
|
|
|
+#ifdef L_getrlimit
|
|
|
#include <unistd.h>
|
|
|
#include <sys/resource.h>
|
|
|
-_syscall2(int,getrlimit,int,resource,struct rlimit *,rlim);
|
|
|
+_syscall2(int, getrlimit, int, resource, struct rlimit *, rlim);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getrusage
|
|
|
+
|
|
|
+#ifdef L_getrusage
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,getrusage,int,who,struct rusage *,usage);
|
|
|
+_syscall2(int, getrusage, int, who, struct rusage *, usage);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_gettimeofday
|
|
|
+
|
|
|
+#ifdef L_gettimeofday
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,gettimeofday,struct timeval *,tv, struct timezone *,tz);
|
|
|
+_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_settimeofday
|
|
|
+
|
|
|
+#ifdef L_settimeofday
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,settimeofday,const struct timeval *,tv, const struct timezone *,tz);
|
|
|
+_syscall2(int, settimeofday, const struct timeval *, tv,
|
|
|
+ const struct timezone *, tz);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getgroups
|
|
|
+
|
|
|
+#ifdef L_getgroups
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,getgroups,int,size,gid_t *,list);
|
|
|
+_syscall2(int, getgroups, int, size, gid_t *, list);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setgroups
|
|
|
+
|
|
|
+#ifdef L_setgroups
|
|
|
#include <unistd.h>
|
|
|
#include <grp.h>
|
|
|
-_syscall2(int,setgroups,size_t,size,const gid_t *,list);
|
|
|
+_syscall2(int, setgroups, size_t, size, const gid_t *, list);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_symlink
|
|
|
+
|
|
|
+#ifdef L_symlink
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,symlink,const char *,oldpath,const char *,newpath);
|
|
|
+_syscall2(int, symlink, const char *, oldpath, const char *, newpath);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_readlink
|
|
|
+
|
|
|
+#ifdef L_readlink
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,readlink,const char *,path, char *,buf, size_t,bufsiz);
|
|
|
+_syscall3(int, readlink, const char *, path, char *, buf, size_t, bufsiz);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_uselib
|
|
|
+
|
|
|
+#ifdef L_uselib
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,uselib,const char *,library);
|
|
|
+_syscall1(int, uselib, const char *, library);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_swapon
|
|
|
+
|
|
|
+#ifdef L_swapon
|
|
|
#include <sys/swap.h>
|
|
|
-_syscall2(int,swapon,const char *,path,int,swapflags);
|
|
|
+_syscall2(int, swapon, const char *, path, int, swapflags);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L__reboot
|
|
|
+
|
|
|
+#ifdef L__reboot
|
|
|
#define __NR__reboot __NR_reboot
|
|
|
-_syscall3(int,_reboot,int,magic,int,magic2,int,flag);
|
|
|
+_syscall3(int, _reboot, int, magic, int, magic2, int, flag);
|
|
|
|
|
|
-int reboot (int flag)
|
|
|
+int reboot(int flag)
|
|
|
{
|
|
|
- return (_reboot( (int)0xfee1dead, 672274793, flag));
|
|
|
+ return (_reboot((int) 0xfee1dead, 672274793, flag));
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L__mmap
|
|
|
#define __NR__mmap __NR_mmap
|
|
|
#include <unistd.h>
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
-_syscall1(__ptr_t,_mmap,unsigned long *,buffer);
|
|
|
+_syscall1(__ptr_t, _mmap, unsigned long *, buffer);
|
|
|
|
|
|
-__ptr_t mmap(__ptr_t addr, size_t len, int prot,
|
|
|
- int flags, int fd, __off_t offset)
|
|
|
+__ptr_t mmap(__ptr_t addr, size_t len, int prot,
|
|
|
+ int flags, int fd, __off_t offset)
|
|
|
{
|
|
|
unsigned long buffer[6];
|
|
|
|
|
|
- buffer[0] = (unsigned long)addr;
|
|
|
- buffer[1] = (unsigned long)len;
|
|
|
- buffer[2] = (unsigned long)prot;
|
|
|
- buffer[3] = (unsigned long)flags;
|
|
|
- buffer[4] = (unsigned long)fd;
|
|
|
- buffer[5] = (unsigned long)offset;
|
|
|
+ buffer[0] = (unsigned long) addr;
|
|
|
+ buffer[1] = (unsigned long) len;
|
|
|
+ buffer[2] = (unsigned long) prot;
|
|
|
+ buffer[3] = (unsigned long) flags;
|
|
|
+ buffer[4] = (unsigned long) fd;
|
|
|
+ buffer[5] = (unsigned long) offset;
|
|
|
return (__ptr_t) _mmap(buffer);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_munmap
|
|
|
+
|
|
|
+#ifdef L_munmap
|
|
|
#include <unistd.h>
|
|
|
#include <sys/mman.h>
|
|
|
-_syscall2(int,munmap,void *,start,size_t,length);
|
|
|
+_syscall2(int, munmap, void *, start, size_t, length);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_truncate
|
|
|
+
|
|
|
+#ifdef L_truncate
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,truncate,const char *,path, off_t,length);
|
|
|
+_syscall2(int, truncate, const char *, path, off_t, length);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_ftruncate
|
|
|
+
|
|
|
+#ifdef L_ftruncate
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,ftruncate,int,fd,off_t,length);
|
|
|
+_syscall2(int, ftruncate, int, fd, off_t, length);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fchmod
|
|
|
+
|
|
|
+#ifdef L_fchmod
|
|
|
#include <sys/stat.h>
|
|
|
-_syscall2(int,fchmod,int,fildes, mode_t,mode);
|
|
|
+_syscall2(int, fchmod, int, fildes, mode_t, mode);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fchown
|
|
|
+
|
|
|
+#ifdef L_fchown
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,fchown,int,fd,uid_t,owner, gid_t,group);
|
|
|
+_syscall3(int, fchown, int, fd, uid_t, owner, gid_t, group);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getpriority
|
|
|
+
|
|
|
+#ifdef L_getpriority
|
|
|
#include <sys/resource.h>
|
|
|
-_syscall2(int,getpriority,int,which, int,who);
|
|
|
+_syscall2(int, getpriority, int, which, int, who);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setpriority
|
|
|
+
|
|
|
+#ifdef L_setpriority
|
|
|
#include <sys/resource.h>
|
|
|
-_syscall3(int,setpriority,int,which, int,who, int,prio);
|
|
|
+_syscall3(int, setpriority, int, which, int, who, int, prio);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_statfs
|
|
|
+
|
|
|
+#ifdef L_statfs
|
|
|
#include <sys/vfs.h>
|
|
|
-_syscall2(int,statfs,const char *,path, struct statfs *,buf);
|
|
|
+_syscall2(int, statfs, const char *, path, struct statfs *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fstatfs
|
|
|
+
|
|
|
+#ifdef L_fstatfs
|
|
|
#include <sys/vfs.h>
|
|
|
-_syscall2(int,fstatfs,int,fd, struct statfs *,buf);
|
|
|
+_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_ioperm
|
|
|
+
|
|
|
+#ifdef L_ioperm
|
|
|
#include <sys/io.h>
|
|
|
-syscall3(int,ioperm,unsigned,long,from,unsigned long, num, int, turn_on);
|
|
|
+syscall3(int, ioperm, unsigned, long, from, unsigned long, num, int,
|
|
|
+
|
|
|
+ turn_on);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_socketcall
|
|
|
-_syscall2(int,socketcall,int,call,unsigned long *,args);
|
|
|
+
|
|
|
+#ifdef L_socketcall
|
|
|
+_syscall2(int, socketcall, int, call, unsigned long *, args);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L__syslog
|
|
|
#include <unistd.h>
|
|
|
#define __NR__syslog __NR_syslog
|
|
|
-_syscall3(int,_syslog,int, type, char *, buf, int, len);
|
|
|
+_syscall3(int, _syslog, int, type, char *, buf, int, len);
|
|
|
|
|
|
-int klogctl (int type, char * buf, int len)
|
|
|
+int klogctl(int type, char *buf, int len)
|
|
|
{
|
|
|
- return(_syslog(type, buf, len));
|
|
|
+ return (_syslog(type, buf, len));
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setitimer
|
|
|
+
|
|
|
+#ifdef L_setitimer
|
|
|
#include <sys/time.h>
|
|
|
-_syscall3(int,setitimer,enum __itimer_which,which, const struct itimerval *,new, struct itimerval *,old);
|
|
|
+_syscall3(int, setitimer, enum __itimer_which, which,
|
|
|
+ const struct itimerval *, new, struct itimerval *, old);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getitimer
|
|
|
+
|
|
|
+#ifdef L_getitimer
|
|
|
#include <sys/time.h>
|
|
|
-_syscall2(int,getitimer,enum __itimer_which,which, struct itimerval *,value);
|
|
|
+_syscall2(int, getitimer, enum __itimer_which, which, struct itimerval *, value);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_stat
|
|
|
-#include <sys/stat.h>
|
|
|
+
|
|
|
+#ifdef L__stat
|
|
|
+#define __NR__stat __NR_stat
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,stat,const char *,file_name, struct stat *,buf);
|
|
|
+#include "statfix.h"
|
|
|
+_syscall2(int, _stat, const char *, file_name, struct kernel_stat *, buf);
|
|
|
+
|
|
|
+int stat(const char * file_name, struct libc_stat * cstat)
|
|
|
+{
|
|
|
+ struct kernel_stat kstat;
|
|
|
+ int result = _stat(file_name, &kstat);
|
|
|
+
|
|
|
+ if (result == 0) {
|
|
|
+ statfix(cstat, &kstat);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_lstat
|
|
|
-#include <sys/stat.h>
|
|
|
+
|
|
|
+#ifdef L__lstat
|
|
|
+#define __NR__lstat __NR_lstat
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,lstat,const char *,file_name, struct stat *,buf);
|
|
|
+#include "statfix.h"
|
|
|
+_syscall2(int, _lstat, const char *, file_name, struct kernel_stat *, buf);
|
|
|
+
|
|
|
+int lstat(const char * file_name, struct libc_stat * cstat)
|
|
|
+{
|
|
|
+ struct kernel_stat kstat;
|
|
|
+ int result = _lstat(file_name, &kstat);
|
|
|
+
|
|
|
+ if (result == 0) {
|
|
|
+ statfix(cstat, &kstat);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fstat
|
|
|
-#include <sys/stat.h>
|
|
|
+
|
|
|
+#ifdef L__fstat
|
|
|
+#define __NR__fstat __NR_fstat
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,fstat,int,filedes, struct stat *,buf);
|
|
|
+#include "statfix.h"
|
|
|
+_syscall2(int, _fstat, int, filedes, struct kernel_stat *, buf);
|
|
|
+
|
|
|
+int fstat(int fd, struct libc_stat *cstat)
|
|
|
+{
|
|
|
+ struct kernel_stat kstat;
|
|
|
+ int result = _fstat(fd, &kstat);
|
|
|
+
|
|
|
+ if (result == 0) {
|
|
|
+ statfix(cstat, &kstat);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_iopl
|
|
|
+
|
|
|
+#ifdef L_iopl
|
|
|
#include <sys/io.h>
|
|
|
-_syscall1(int,iopl,int,level);
|
|
|
+_syscall1(int, iopl, int, level);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_vhangup
|
|
|
+
|
|
|
+#ifdef L_vhangup
|
|
|
#include <unistd.h>
|
|
|
-_syscall0(int,vhangup);
|
|
|
+_syscall0(int, vhangup);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_wait4
|
|
|
+
|
|
|
+#ifdef L_wait4
|
|
|
#include <sys/wait.h>
|
|
|
-_syscall4(pid_t,wait4,pid_t,pid, int *,status, int,options, struct rusage *,rusage);
|
|
|
+_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options,
|
|
|
+ struct rusage *, rusage);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_swapoff
|
|
|
+
|
|
|
+#ifdef L_swapoff
|
|
|
#include <sys/swap.h>
|
|
|
-_syscall1(int,swapoff,const char *,path);
|
|
|
+_syscall1(int, swapoff, const char *, path);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sysinfo
|
|
|
+
|
|
|
+#ifdef L_sysinfo
|
|
|
#include <sys/sysinfo.h>
|
|
|
-_sysinfo(int,sysinfo,struct sysinfo *,info);
|
|
|
+_sysinfo(int, sysinfo, struct sysinfo *, info);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_ipc
|
|
|
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fsync
|
|
|
+
|
|
|
+#ifdef L_fsync
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,fsync,int,fd);
|
|
|
+_syscall1(int, fsync, int, fd);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setdomainname
|
|
|
+
|
|
|
+#ifdef L_setdomainname
|
|
|
#include <unistd.h>
|
|
|
-_syscall2(int,setdomainname,const char *,name, size_t,len);
|
|
|
+_syscall2(int, setdomainname, const char *, name, size_t, len);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_uname
|
|
|
+
|
|
|
+#ifdef L_uname
|
|
|
#include <sys/utsname.h>
|
|
|
-_syscall1(int,uname,struct utsname *,buf);
|
|
|
+_syscall1(int, uname, struct utsname *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_adjtimex
|
|
|
+
|
|
|
+#ifdef L_adjtimex
|
|
|
#include <sys/timex.h>
|
|
|
-_syscall1(int,adjtimex,struct timex *,buf);
|
|
|
+_syscall1(int, adjtimex, struct timex *, buf);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_mprotect
|
|
|
+
|
|
|
+#ifdef L_mprotect
|
|
|
#include <sys/mman.h>
|
|
|
-_syscall3(int,mprotect,const void *,addr, size_t,len, int,prot);
|
|
|
+_syscall3(int, mprotect, const void *, addr, size_t, len, int, prot);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_sigprocmask
|
|
|
+
|
|
|
+#ifdef L_sigprocmask
|
|
|
#include <signal.h>
|
|
|
-_syscall3(int,sigprocmask,int,how, const sigset_t *,set, sigset_t *,oldset);
|
|
|
+_syscall3(int, sigprocmask, int, how, const sigset_t *, set, sigset_t *,
|
|
|
+
|
|
|
+ oldset);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getpgid
|
|
|
-_syscall1(pid_t,getpgid,pid_t,pid);
|
|
|
+
|
|
|
+#ifdef L_getpgid
|
|
|
+_syscall1(pid_t, getpgid, pid_t, pid);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_fchdir
|
|
|
+
|
|
|
+#ifdef L_fchdir
|
|
|
#include <unistd.h>
|
|
|
-_syscall1(int,fchdir,int,fd);
|
|
|
+_syscall1(int, fchdir, int, fd);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_setfsuid
|
|
|
-SYSCALL__ (setfsuid, 1)
|
|
|
+
|
|
|
+#ifdef L_setfsuid
|
|
|
+SYSCALL__(setfsuid, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_setfsgid
|
|
|
-SYSCALL__ (setfsgid, 1)
|
|
|
+
|
|
|
+#ifdef L_setfsgid
|
|
|
+ SYSCALL__(setfsgid, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
#ifdef L__llseek
|
|
|
-_syscall5(int,_llseek,int,fd,off_t,hoff,off_t,loff,loff_t*,res,int,whence);
|
|
|
+ _syscall5(int, _llseek, int, fd, off_t, hoff, off_t, loff, loff_t *, res,
|
|
|
+ int, whence);
|
|
|
|
|
|
-loff_t llseek (int fd, loff_t offset, int whence)
|
|
|
+loff_t llseek(int fd, loff_t offset, int whence)
|
|
|
{
|
|
|
- int ret;
|
|
|
- loff_t result;
|
|
|
+ int ret;
|
|
|
+ loff_t result;
|
|
|
|
|
|
- ret = _llseek (fd, (off_t) (offset >> 32),
|
|
|
- (off_t) (offset & 0xffffffff), &result, whence);
|
|
|
+ ret = _llseek(fd, (off_t) (offset >> 32),
|
|
|
+ (off_t) (offset & 0xffffffff), &result, whence);
|
|
|
|
|
|
- return ret ? (loff_t) ret : result;
|
|
|
+ return ret ? (loff_t) ret : result;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getdents
|
|
|
-SYSCALL__ (getdents, 3)
|
|
|
- ret
|
|
|
+
|
|
|
+#ifdef L_getdents
|
|
|
+#include <unistd.h>
|
|
|
+#include <dirent.h>
|
|
|
+_syscall3(int, getdents, unsigned int, fd, struct dirent *, dirp, unsigned int, count);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
#ifdef L__newselect
|
|
|
#include <unistd.h>
|
|
|
-_syscall5(int,_newselect,int, n, fd_set *,readfds, fd_set *,writefds,
|
|
|
- fd_set *,exceptfds, struct timeval *,timeout);
|
|
|
+ _syscall5(int, _newselect, int, n, fd_set *, readfds, fd_set *, writefds,
|
|
|
+ fd_set *, exceptfds, struct timeval *, timeout);
|
|
|
|
|
|
-int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|
|
- struct timeval *timeout)
|
|
|
+int select(int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds,
|
|
|
+ struct timeval *timeout)
|
|
|
{
|
|
|
- return(_newselect(n, readfds, writefds, exceptfds, timeout));
|
|
|
+ return (_newselect(n, readfds, writefds, exceptfds, timeout));
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_flock
|
|
|
-SYSCALL__ (flock, 2)
|
|
|
+
|
|
|
+#ifdef L_flock
|
|
|
+SYSCALL__(flock, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_msync
|
|
|
-SYSCALL__ (msync, 3)
|
|
|
+
|
|
|
+#ifdef L_msync
|
|
|
+ SYSCALL__(msync, 3)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_readv
|
|
|
+
|
|
|
+#ifdef L_readv
|
|
|
#include <sys/uio.h>
|
|
|
-_syscall3(ssize_t,readv,int,filedes, const struct iovec *,vector, int,count);
|
|
|
+ _syscall3(ssize_t, readv, int, filedes, const struct iovec *, vector, int,
|
|
|
+ count);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_writev
|
|
|
+
|
|
|
+#ifdef L_writev
|
|
|
#include <sys/uio.h>
|
|
|
-_syscall3(ssize_t,writev,int,filedes, const struct iovec *,vector, int,count);
|
|
|
+_syscall3(ssize_t, writev, int, filedes, const struct iovec *, vector, int,
|
|
|
+
|
|
|
+ count);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-#ifdef L_getsid
|
|
|
-SYSCALL__ (getsid, 1)
|
|
|
+
|
|
|
+#ifdef L_getsid
|
|
|
+SYSCALL__(getsid, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_fdatasync
|
|
|
-SYSCALL__ (fdatasync, 1)
|
|
|
+
|
|
|
+#ifdef L_fdatasync
|
|
|
+ SYSCALL__(fdatasync, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_mlock
|
|
|
-SYSCALL__ (mlock, 2)
|
|
|
+
|
|
|
+
|
|
|
+#ifdef L_mlock
|
|
|
+ SYSCALL__(mlock, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_munlock
|
|
|
-SYSCALL__ (munlock, 2)
|
|
|
+
|
|
|
+#ifdef L_munlock
|
|
|
+ SYSCALL__(munlock, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_mlockall
|
|
|
-SYSCALL__ (mlockall, 1)
|
|
|
+
|
|
|
+#ifdef L_mlockall
|
|
|
+ SYSCALL__(mlockall, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_munlockall
|
|
|
-SYSCALL__ (munlockall, 0)
|
|
|
+
|
|
|
+#ifdef L_munlockall
|
|
|
+ SYSCALL__(munlockall, 0)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_setparam
|
|
|
-SYSCALL__ (sched_setparam, 2)
|
|
|
+
|
|
|
+#ifdef L_sched_setparam
|
|
|
+ SYSCALL__(sched_setparam, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_getparam
|
|
|
-SYSCALL__ (sched_getparam, 2)
|
|
|
+
|
|
|
+#ifdef L_sched_getparam
|
|
|
+ SYSCALL__(sched_getparam, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_setscheduler
|
|
|
-SYSCALL__ (sched_setscheduler, 3)
|
|
|
+
|
|
|
+#ifdef L_sched_setscheduler
|
|
|
+ SYSCALL__(sched_setscheduler, 3)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_getscheduler
|
|
|
-SYSCALL__ (sched_getscheduler, 1)
|
|
|
+
|
|
|
+#ifdef L_sched_getscheduler
|
|
|
+ SYSCALL__(sched_getscheduler, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_yield
|
|
|
-SYSCALL__ (sched_yield, 0)
|
|
|
+
|
|
|
+#ifdef L_sched_yield
|
|
|
+ SYSCALL__(sched_yield, 0)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_get_priority_max
|
|
|
-SYSCALL__ (sched_get_priority_max, 1)
|
|
|
+
|
|
|
+#ifdef L_sched_get_priority_max
|
|
|
+ SYSCALL__(sched_get_priority_max, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_get_priority_min
|
|
|
-SYSCALL__ (sched_get_priority_min, 1)
|
|
|
+
|
|
|
+#ifdef L_sched_get_priority_min
|
|
|
+ SYSCALL__(sched_get_priority_min, 1)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_sched_rr_get_interval
|
|
|
-SYSCALL__ (sched_rr_get_interval, 2)
|
|
|
+
|
|
|
+#ifdef L_sched_rr_get_interval
|
|
|
+ SYSCALL__(sched_rr_get_interval, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_nanosleep
|
|
|
-SYSCALL__ (nanosleep, 2)
|
|
|
+
|
|
|
+#ifdef L_nanosleep
|
|
|
+ SYSCALL__(nanosleep, 2)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
#ifdef L_mremap
|
|
|
#include <unistd.h>
|
|
|
#include <sys/mman.h>
|
|
|
-_syscall4(__ptr_t,mremap,__ptr_t,old_address,size_t,old_size , size_t,new_size,int,may_move);
|
|
|
+ _syscall4(__ptr_t, mremap, __ptr_t, old_address, size_t, old_size, size_t,
|
|
|
+ new_size, int, may_move);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-#ifdef L_poll
|
|
|
-SYSCALL__ (poll, 3)
|
|
|
+
|
|
|
+#ifdef L_poll
|
|
|
+SYSCALL__(poll, 3)
|
|
|
ret
|
|
|
#endif
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-#ifdef L_chown
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#ifdef L_chown
|
|
|
#include <unistd.h>
|
|
|
-_syscall3(int,chown,const char *,path, uid_t,owner, gid_t,group);
|
|
|
+ _syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group);
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
+
|
|
|
|
|
|
+
|