1433d6423SLionel Sambuc /* This file contains the table used to map system call numbers onto the 2433d6423SLionel Sambuc * routines that perform them. 3433d6423SLionel Sambuc */ 4433d6423SLionel Sambuc 5433d6423SLionel Sambuc #define _TABLE 6433d6423SLionel Sambuc 7433d6423SLionel Sambuc #include "fs.h" 8433d6423SLionel Sambuc #include <minix/callnr.h> 9433d6423SLionel Sambuc #include <minix/com.h> 10433d6423SLionel Sambuc #include "file.h" 11433d6423SLionel Sambuc #include "lock.h" 12433d6423SLionel Sambuc #include "vnode.h" 13433d6423SLionel Sambuc #include "vmnt.h" 14433d6423SLionel Sambuc 15433d6423SLionel Sambuc #define CALL(n) [((n) - VFS_BASE)] 16433d6423SLionel Sambuc 17433d6423SLionel Sambuc int (* const call_vec[NR_VFS_CALLS])(void) = { 18433d6423SLionel Sambuc CALL(VFS_READ) = do_read, /* read(2) */ 19433d6423SLionel Sambuc CALL(VFS_WRITE) = do_write, /* write(2) */ 20433d6423SLionel Sambuc CALL(VFS_LSEEK) = do_lseek, /* lseek(2) */ 21433d6423SLionel Sambuc CALL(VFS_OPEN) = do_open, /* open(2) */ 22433d6423SLionel Sambuc CALL(VFS_CREAT) = do_creat, /* creat(2) */ 23433d6423SLionel Sambuc CALL(VFS_CLOSE) = do_close, /* close(2) */ 24433d6423SLionel Sambuc CALL(VFS_LINK) = do_link, /* link(2) */ 25433d6423SLionel Sambuc CALL(VFS_UNLINK) = do_unlink, /* unlink(2) */ 26433d6423SLionel Sambuc CALL(VFS_CHDIR) = do_chdir, /* chdir(2) */ 27433d6423SLionel Sambuc CALL(VFS_MKDIR) = do_mkdir, /* mkdir(2) */ 28433d6423SLionel Sambuc CALL(VFS_MKNOD) = do_mknod, /* mknod(2) */ 29433d6423SLionel Sambuc CALL(VFS_CHMOD) = do_chmod, /* chmod(2) */ 30433d6423SLionel Sambuc CALL(VFS_CHOWN) = do_chown, /* chown(2) */ 31433d6423SLionel Sambuc CALL(VFS_MOUNT) = do_mount, /* mount(2) */ 32433d6423SLionel Sambuc CALL(VFS_UMOUNT) = do_umount, /* umount(2) */ 33433d6423SLionel Sambuc CALL(VFS_ACCESS) = do_access, /* access(2) */ 34433d6423SLionel Sambuc CALL(VFS_SYNC) = do_sync, /* sync(2) */ 35433d6423SLionel Sambuc CALL(VFS_RENAME) = do_rename, /* rename(2) */ 36433d6423SLionel Sambuc CALL(VFS_RMDIR) = do_unlink, /* rmdir(2) */ 37433d6423SLionel Sambuc CALL(VFS_SYMLINK) = do_slink, /* symlink(2) */ 38433d6423SLionel Sambuc CALL(VFS_READLINK) = do_rdlink, /* readlink(2) */ 39433d6423SLionel Sambuc CALL(VFS_STAT) = do_stat, /* stat(2) */ 40433d6423SLionel Sambuc CALL(VFS_FSTAT) = do_fstat, /* fstat(2) */ 41433d6423SLionel Sambuc CALL(VFS_LSTAT) = do_lstat, /* lstat(2) */ 42433d6423SLionel Sambuc CALL(VFS_IOCTL) = do_ioctl, /* ioctl(2) */ 43433d6423SLionel Sambuc CALL(VFS_FCNTL) = do_fcntl, /* fcntl(2) */ 44433d6423SLionel Sambuc CALL(VFS_PIPE2) = do_pipe2, /* pipe2(2) */ 45433d6423SLionel Sambuc CALL(VFS_UMASK) = do_umask, /* umask(2) */ 46433d6423SLionel Sambuc CALL(VFS_CHROOT) = do_chroot, /* chroot(2) */ 47433d6423SLionel Sambuc CALL(VFS_GETDENTS) = do_getdents, /* getdents(2) */ 48433d6423SLionel Sambuc CALL(VFS_SELECT) = do_select, /* select(2) */ 49433d6423SLionel Sambuc CALL(VFS_FCHDIR) = do_fchdir, /* fchdir(2) */ 50433d6423SLionel Sambuc CALL(VFS_FSYNC) = do_fsync, /* fsync(2) */ 51433d6423SLionel Sambuc CALL(VFS_TRUNCATE) = do_truncate, /* truncate(2) */ 52433d6423SLionel Sambuc CALL(VFS_FTRUNCATE) = do_ftruncate, /* ftruncate(2) */ 53433d6423SLionel Sambuc CALL(VFS_FCHMOD) = do_chmod, /* fchmod(2) */ 54433d6423SLionel Sambuc CALL(VFS_FCHOWN) = do_chown, /* fchown(2) */ 55433d6423SLionel Sambuc CALL(VFS_UTIMENS) = do_utimens, /* [fl]utime[n]s(2) */ 56433d6423SLionel Sambuc CALL(VFS_VMCALL) = do_vm_call, 57433d6423SLionel Sambuc CALL(VFS_GETVFSSTAT) = do_getvfsstat, /* getvfsstat(2) */ 58433d6423SLionel Sambuc CALL(VFS_STATVFS1) = do_statvfs, /* statvfs(2) */ 59433d6423SLionel Sambuc CALL(VFS_FSTATVFS1) = do_fstatvfs, /* fstatvfs(2) */ 60bc2d75faSDavid van Moolenbroek CALL(VFS_GETRUSAGE) = do_getrusage, /* (obsolete) */ 61433d6423SLionel Sambuc CALL(VFS_SVRCTL) = do_svrctl, /* svrctl(2) */ 62433d6423SLionel Sambuc CALL(VFS_GCOV_FLUSH) = do_gcov_flush, /* gcov_flush(2) */ 63433d6423SLionel Sambuc CALL(VFS_MAPDRIVER) = do_mapdriver, /* mapdriver(2) */ 64433d6423SLionel Sambuc CALL(VFS_COPYFD) = do_copyfd, /* copyfd(2) */ 65*dd969671SDavid van Moolenbroek CALL(VFS_SOCKETPATH) = do_socketpath, /* socketpath(2) */ 66433d6423SLionel Sambuc CALL(VFS_GETSYSINFO) = do_getsysinfo, /* getsysinfo(2) */ 67c38dbb97SDavid van Moolenbroek CALL(VFS_SOCKET) = do_socket, /* socket(2) */ 68c38dbb97SDavid van Moolenbroek CALL(VFS_SOCKETPAIR) = do_socketpair, /* socketpair(2) */ 69c38dbb97SDavid van Moolenbroek CALL(VFS_BIND) = do_bind, /* bind(2) */ 70c38dbb97SDavid van Moolenbroek CALL(VFS_CONNECT) = do_connect, /* connect(2) */ 71c38dbb97SDavid van Moolenbroek CALL(VFS_LISTEN) = do_listen, /* listen(2) */ 72c38dbb97SDavid van Moolenbroek CALL(VFS_ACCEPT) = do_accept, /* accept(2) */ 73c38dbb97SDavid van Moolenbroek CALL(VFS_SENDTO) = do_sendto, /* sendto(2) */ 74c38dbb97SDavid van Moolenbroek CALL(VFS_SENDMSG) = do_sockmsg, /* sendmsg(2) */ 75c38dbb97SDavid van Moolenbroek CALL(VFS_RECVFROM) = do_recvfrom, /* recvfrom(2) */ 76c38dbb97SDavid van Moolenbroek CALL(VFS_RECVMSG) = do_sockmsg, /* recvmsg(2) */ 77c38dbb97SDavid van Moolenbroek CALL(VFS_SETSOCKOPT) = do_setsockopt, /* setsockopt(2) */ 78c38dbb97SDavid van Moolenbroek CALL(VFS_GETSOCKOPT) = do_getsockopt, /* getsockopt(2) */ 79c38dbb97SDavid van Moolenbroek CALL(VFS_GETSOCKNAME) = do_getsockname, /* getsockname(2) */ 80c38dbb97SDavid van Moolenbroek CALL(VFS_GETPEERNAME) = do_getpeername, /* getpeername(2) */ 81c38dbb97SDavid van Moolenbroek CALL(VFS_SHUTDOWN) = do_shutdown, /* shutdown(2) */ 82433d6423SLionel Sambuc }; 83