diff options
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/linux/linux_file.c | 21 | ||||
-rw-r--r-- | sys/i386/linux/linux_proto.h | 7 | ||||
-rw-r--r-- | sys/i386/linux/linux_syscall.h | 4 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysent.c | 4 | ||||
-rw-r--r-- | sys/i386/linux/syscalls.master | 4 |
5 files changed, 32 insertions, 8 deletions
diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c index 49b054f..ded59f9 100644 --- a/sys/i386/linux/linux_file.c +++ b/sys/i386/linux/linux_file.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_file.c,v 1.26 1999/05/11 19:54:19 phk Exp $ + * $Id: linux_file.c,v 1.27 1999/07/18 14:31:01 phk Exp $ */ #include "opt_compat.h" @@ -827,3 +827,22 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args) return truncate(p, &bsd); } +int +linux_link(struct proc *p, struct linux_link_args *args) +{ + struct link_args bsd; + caddr_t sg; + + sg = stackgap_init(); + CHECKALTEXIST(p, &sg, args->path); + CHECKALTCREAT(p, &sg, args->to); + +#ifdef DEBUG + printf("Linux-emul(%d): link(%s, %s)\n", p->p_pid, args->path, args->to); +#endif + + bsd.path = args->path; + bsd.link = args->to; + + return link(p, &bsd); +} diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 0cf00373..0729eee 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * created from Id: syscalls.master,v 1.17 1999/08/11 13:29:48 marcel Exp + * created from Id: syscalls.master,v 1.18 1999/08/12 19:51:03 marcel Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -35,6 +35,10 @@ struct linux_creat_args { char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; +struct linux_link_args { + char * path; char path_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; +}; struct linux_unlink_args { char * path; char path_[PAD_(char *)]; }; @@ -400,6 +404,7 @@ int linux_fork __P((struct proc *, struct linux_fork_args *)); int linux_open __P((struct proc *, struct linux_open_args *)); int linux_waitpid __P((struct proc *, struct linux_waitpid_args *)); int linux_creat __P((struct proc *, struct linux_creat_args *)); +int linux_link __P((struct proc *, struct linux_link_args *)); int linux_unlink __P((struct proc *, struct linux_unlink_args *)); int linux_execve __P((struct proc *, struct linux_execve_args *)); int linux_chdir __P((struct proc *, struct linux_chdir_args *)); diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 100288d..eb1326a 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from Id: syscalls.master,v 1.17 1999/08/11 13:29:48 marcel Exp + * created from Id: syscalls.master,v 1.18 1999/08/12 19:51:03 marcel Exp */ #define LINUX_SYS_linux_setup 0 @@ -14,7 +14,7 @@ #define LINUX_SYS_close 6 #define LINUX_SYS_linux_waitpid 7 #define LINUX_SYS_linux_creat 8 -#define LINUX_SYS_link 9 +#define LINUX_SYS_linux_link 9 #define LINUX_SYS_linux_unlink 10 #define LINUX_SYS_linux_execve 11 #define LINUX_SYS_linux_chdir 12 diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index fa39fd1..a03bd95 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from Id: syscalls.master,v 1.17 1999/08/11 13:29:48 marcel Exp + * created from Id: syscalls.master,v 1.18 1999/08/12 19:51:03 marcel Exp */ #include "opt_compat.h" @@ -23,7 +23,7 @@ struct sysent linux_sysent[] = { { 1, (sy_call_t *)close }, /* 6 = close */ { 3, (sy_call_t *)linux_waitpid }, /* 7 = linux_waitpid */ { 2, (sy_call_t *)linux_creat }, /* 8 = linux_creat */ - { 2, (sy_call_t *)link }, /* 9 = link */ + { 2, (sy_call_t *)linux_link }, /* 9 = linux_link */ { 1, (sy_call_t *)linux_unlink }, /* 10 = linux_unlink */ { 3, (sy_call_t *)linux_execve }, /* 11 = linux_execve */ { 1, (sy_call_t *)linux_chdir }, /* 12 = linux_chdir */ diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 87faa01..ebd0869 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1,4 +1,4 @@ - $Id: syscalls.master,v 1.16 1998/12/30 20:58:28 sos Exp $ + $Id: syscalls.master,v 1.17 1999/08/11 13:29:48 marcel Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -40,7 +40,7 @@ 6 NOPROTO LINUX { int close(int fd); } 7 STD LINUX { int linux_waitpid(int pid, int *status, int options);} 8 STD LINUX { int linux_creat(char *path, int mode); } -9 NOPROTO LINUX { int link(char *path, char *link); } +9 STD LINUX { int linux_link(char *path, char *to); } 10 STD LINUX { int linux_unlink(char *path); } 11 STD LINUX { int linux_execve(char *path, char **argp, char **envp); } 12 STD LINUX { int linux_chdir(char *path); } |