diff options
author | sos <sos@FreeBSD.org> | 1996-01-14 10:59:58 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1996-01-14 10:59:58 +0000 |
commit | 158fdfef06d5aeef67ca79424bcba719c4fc9cdc (patch) | |
tree | 541e23eecb070de024640c064206cd31a9955204 /sys/i386 | |
parent | 4eb0edb707145d8d4772b3b3c9f5caf2892ea0eb (diff) | |
download | FreeBSD-src-158fdfef06d5aeef67ca79424bcba719c4fc9cdc.zip FreeBSD-src-158fdfef06d5aeef67ca79424bcba719c4fc9cdc.tar.gz |
Add linux_mknod so that it will do mkfifo if needed...
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/linux/linux_misc.c | 17 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysent.c | 84 | ||||
-rw-r--r-- | sys/i386/linux/sysproto.h | 3 |
3 files changed, 61 insertions, 43 deletions
diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c index 1714240..4651de0 100644 --- a/sys/i386/linux/linux_misc.c +++ b/sys/i386/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.8 1995/12/15 03:06:54 peter Exp $ + * $Id: linux_misc.c,v 1.9 1995/12/15 03:28:38 peter Exp $ */ #include <sys/param.h> @@ -674,3 +674,18 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval) (bsd_to_linux_signal[WSTOPSIG(tmpstat)]<<8); return copyout(&tmpstat, args->status, sizeof(int)); } + +struct linux_mknod_args { + char *path; + int mode; + int dev; +}; + +int +linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval) +{ + if (args->mode & S_IFIFO) + return mkfifo(p, (struct mkfifo_args *)args, retval); + else + return mknod(p, (struct mknod_args *)args, retval); +} diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 572611c..0813e9b 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysent.c,v 1.2 1995/11/06 12:52:25 davidg Exp $ + * $Id: linux_sysent.c,v 1.3 1995/11/22 07:43:52 bde Exp $ */ /* XXX we use functions that might not exist. */ @@ -43,10 +43,10 @@ static struct sysent linux_sysent[] = { 0, (sy_call_t *)linux_setup, /* 0 */ 1, (sy_call_t *)exit, /* 1 */ - 0, (sy_call_t *)linux_fork, /* 2 */ + 0, (sy_call_t *)linux_fork, /* 2 */ 3, (sy_call_t *)read, /* 3 */ 3, (sy_call_t *)write, /* 4 */ - 3, (sy_call_t *)linux_open, /* 5 */ + 3, (sy_call_t *)linux_open, /* 5 */ 1, (sy_call_t *)close, /* 6 */ 3, (sy_call_t *)linux_waitpid, /* 7 */ 2, (sy_call_t *)linux_creat, /* 8 */ @@ -54,12 +54,12 @@ static struct sysent linux_sysent[] = { 1, (sy_call_t *)unlink, /* 10 */ 3, (sy_call_t *)execve, /* 11 */ 1, (sy_call_t *)chdir, /* 12 */ - 1, (sy_call_t *)linux_time, /* 13 */ - 3, (sy_call_t *)mknod, /* 14 */ + 1, (sy_call_t *)linux_time, /* 13 */ + 3, (sy_call_t *)linux_mknod, /* 14 */ 2, (sy_call_t *)chmod, /* 15 */ 3, (sy_call_t *)chown, /* 16 */ 1, (sy_call_t *)linux_break, /* 17 */ - 2, (sy_call_t *)linux_stat, /* 18 */ + 2, (sy_call_t *)linux_stat, /* 18 */ 3, (sy_call_t *)linux_lseek, /* 19 */ 0, (sy_call_t *)getpid, /* 20 */ 5, (sy_call_t *)linux_mount, /* 21 */ @@ -72,32 +72,32 @@ static struct sysent linux_sysent[] = { 2, (sy_call_t *)linux_fstat, /* 28 */ 0, (sy_call_t *)linux_pause, /* 29 */ 2, (sy_call_t *)linux_utime, /* 30 */ - 0, (sy_call_t *)linux_stty, /* 31 */ - 0, (sy_call_t *)linux_gtty, /* 32 */ + 0, (sy_call_t *)linux_stty, /* 31 */ + 0, (sy_call_t *)linux_gtty, /* 32 */ 2, (sy_call_t *)access, /* 33 */ - 1, (sy_call_t *)linux_nice, /* 34 */ + 1, (sy_call_t *)linux_nice, /* 34 */ 0, (sy_call_t *)linux_ftime, /* 35 */ 0, (sy_call_t *)sync, /* 36 */ - 2, (sy_call_t *)linux_kill, /* 37 */ + 2, (sy_call_t *)linux_kill, /* 37 */ 2, (sy_call_t *)rename, /* 38 */ 2, (sy_call_t *)mkdir, /* 39 */ 1, (sy_call_t *)rmdir, /* 40 */ 1, (sy_call_t *)dup, /* 41 */ - 1, (sy_call_t *)linux_pipe, /* 42 */ + 1, (sy_call_t *)linux_pipe, /* 42 */ 1, (sy_call_t *)linux_times, /* 43 */ - 0, (sy_call_t *)linux_prof, /* 44 */ - 1, (sy_call_t *)linux_brk, /* 45 */ + 0, (sy_call_t *)linux_prof, /* 44 */ + 1, (sy_call_t *)linux_brk, /* 45 */ 1, (sy_call_t *)setgid, /* 46 */ 0, (sy_call_t *)getgid, /* 47 */ 2, (sy_call_t *)linux_signal, /* 48 */ 0, (sy_call_t *)geteuid, /* 49 */ 0, (sy_call_t *)getegid, /* 50 */ 0, (sy_call_t *)acct, /* 51 */ - 0, (sy_call_t *)linux_phys, /* 52 */ - 0, (sy_call_t *)linux_lock, /* 53 */ + 0, (sy_call_t *)linux_phys, /* 52 */ + 0, (sy_call_t *)linux_lock, /* 53 */ 3, (sy_call_t *)linux_ioctl, /* 54 */ 3, (sy_call_t *)linux_fcntl, /* 55 */ - 0, (sy_call_t *)linux_mpx, /* 56 */ + 0, (sy_call_t *)linux_mpx, /* 56 */ 2, (sy_call_t *)setpgid, /* 57 */ 0, (sy_call_t *)linux_ulimit, /* 58 */ 1, (sy_call_t *)linux_olduname, /* 59 */ @@ -109,32 +109,32 @@ static struct sysent linux_sysent[] = { 0, (sy_call_t *)getpgrp, /* 65 */ 0, (sy_call_t *)setsid, /* 66 */ 3, (sy_call_t *)linux_sigaction, /* 67 */ - 0, (sy_call_t *)linux_siggetmask, /* 68 */ - 1, (sy_call_t *)linux_sigsetmask, /* 69 */ - 2, (sy_call_t *)setreuid, /* 70 */ - 2, (sy_call_t *)setregid, /* 71 */ - 1, (sy_call_t *)linux_sigsuspend, /* 72 */ - 1, (sy_call_t *)linux_sigpending, /* 73 */ + 0, (sy_call_t *)linux_siggetmask, /* 68 */ + 1, (sy_call_t *)linux_sigsetmask, /* 69 */ + 2, (sy_call_t *)setreuid, /* 70 */ + 2, (sy_call_t *)setregid, /* 71 */ + 1, (sy_call_t *)linux_sigsuspend, /* 72 */ + 1, (sy_call_t *)linux_sigpending, /* 73 */ 2, (sy_call_t *)osethostname, /* 74 */ - 2, (sy_call_t *)osetrlimit, /* 75 */ - 2, (sy_call_t *)ogetrlimit, /* 76 */ - 2, (sy_call_t *)getrusage, /* 77 */ + 2, (sy_call_t *)osetrlimit, /* 75 */ + 2, (sy_call_t *)ogetrlimit, /* 76 */ + 2, (sy_call_t *)getrusage, /* 77 */ 2, (sy_call_t *)gettimeofday, /* 78 */ 2, (sy_call_t *)settimeofday, /* 79 */ - 2, (sy_call_t *)getgroups, /* 80 */ - 2, (sy_call_t *)setgroups, /* 81 */ + 2, (sy_call_t *)getgroups, /* 80 */ + 2, (sy_call_t *)setgroups, /* 81 */ 1, (sy_call_t *)linux_select, /* 82 */ 2, (sy_call_t *)symlink, /* 83 */ 2, (sy_call_t *)ostat, /* 84 */ - 3, (sy_call_t *)readlink, /* 85 */ + 3, (sy_call_t *)readlink, /* 85 */ 1, (sy_call_t *)linux_uselib, /* 86 */ 1, (sy_call_t *)swapon, /* 87 */ 3, (sy_call_t *)reboot, /* 88 */ 3, (sy_call_t *)linux_readdir, /* 89 */ - 1, (sy_call_t *)linux_mmap, /* 90 */ + 1, (sy_call_t *)linux_mmap, /* 90 */ 2, (sy_call_t *)munmap, /* 91 */ - 2, (sy_call_t *)otruncate, /* 92 */ - 2, (sy_call_t *)oftruncate, /* 93 */ + 2, (sy_call_t *)otruncate, /* 92 */ + 2, (sy_call_t *)oftruncate, /* 93 */ 2, (sy_call_t *)fchmod, /* 94 */ 3, (sy_call_t *)fchown, /* 95 */ 2, (sy_call_t *)getpriority, /* 96 */ @@ -143,33 +143,33 @@ static struct sysent linux_sysent[] = { 2, (sy_call_t *)linux_statfs, /* 99 */ 2, (sy_call_t *)linux_fstatfs, /* 100 */ 3, (sy_call_t *)linux_ioperm, /* 101 */ - 2, (sy_call_t *)linux_socketcall, /* 102 */ + 2, (sy_call_t *)linux_socketcall, /* 102 */ 3, (sy_call_t *)linux_syslog, /* 103 */ - 3, (sy_call_t *)setitimer, /* 104 */ - 2, (sy_call_t *)getitimer, /* 105 */ + 3, (sy_call_t *)setitimer, /* 104 */ + 2, (sy_call_t *)getitimer, /* 105 */ 2, (sy_call_t *)linux_newstat, /* 106 */ 2, (sy_call_t *)linux_newlstat, /* 107 */ 2, (sy_call_t *)linux_newfstat, /* 108 */ 2, (sy_call_t *)linux_uname, /* 109 */ - 1, (sy_call_t *)linux_iopl, /* 110 */ + 1, (sy_call_t *)linux_iopl, /* 110 */ 0, (sy_call_t *)linux_vhangup, /* 111 */ - 0, (sy_call_t *)linux_idle, /* 112 */ - 1, (sy_call_t *)linux_vm86, /* 113 */ + 0, (sy_call_t *)linux_idle, /* 112 */ + 1, (sy_call_t *)linux_vm86, /* 113 */ 4, (sy_call_t *)linux_wait4, /* 114 */ 1, (sy_call_t *)linux_swapoff, /* 115 */ 1, (sy_call_t *)linux_sysinfo, /* 116 */ - 4, (sy_call_t *)linux_ipc, /* 117 */ + 4, (sy_call_t *)linux_ipc, /* 117 */ 1, (sy_call_t *)fsync, /* 118 */ 1, (sy_call_t *)linux_sigreturn, /* 119 */ 0, (sy_call_t *)linux_clone, /* 120 */ 2, (sy_call_t *)setdomainname, /* 121 */ 1, (sy_call_t *)linux_newuname, /* 122 */ - 3, (sy_call_t *)linux_modify_ldt, /* 123 */ + 3, (sy_call_t *)linux_modify_ldt, /* 123 */ 1, (sy_call_t *)linux_adjtimex, /* 124 */ - 3, (sy_call_t *)mprotect, /* 125 */ - 3, (sy_call_t *)linux_sigprocmask, /* 126 */ + 3, (sy_call_t *)mprotect, /* 125 */ + 3, (sy_call_t *)linux_sigprocmask, /* 126 */ 2, (sy_call_t *)linux_create_module, /* 127 */ - 4, (sy_call_t *)linux_init_module, /* 128 */ + 4, (sy_call_t *)linux_init_module, /* 128 */ 1, (sy_call_t *)linux_delete_module, /* 129 */ 1, (sy_call_t *)linux_get_kernel_syms, /* 130 */ 0, (sy_call_t *)linux_quotactl, /* 131 */ diff --git a/sys/i386/linux/sysproto.h b/sys/i386/linux/sysproto.h index 87bd29f..ea6ab57 100644 --- a/sys/i386/linux/sysproto.h +++ b/sys/i386/linux/sysproto.h @@ -25,6 +25,7 @@ struct linux_kill_args; struct linux_listen_args; struct linux_lseek_args; struct linux_mmap_args; +struct linux_mknod_args; struct linux_newfstat_args; struct linux_newstat_args; struct linux_newuname_args; @@ -146,6 +147,8 @@ int linux_brk __P((struct proc *p, struct linux_brk_args *args, int linux_fork __P((struct proc *p, void *args, int *retval)); int linux_getpgid __P((struct proc *p, struct linux_getpgid_args *args, int *retval)); +int linux_mknod __P((struct proc *p, struct linux_mknod_args *args, + int *retval)); int linux_mmap __P((struct proc *p, struct linux_mmap_args *args, int *retval)); int linux_newuname __P((struct proc *p, struct linux_newuname_args *args, |