Deleted Added
full compact
linux_file.c (63285) linux_file.c (64905)
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 63285 2000-07-17 00:17:07Z marcel $
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 64905 2000-08-22 01:27:36Z marcel $
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sysproto.h>
36#include <sys/fcntl.h>
37#include <sys/file.h>
38#include <sys/filedesc.h>
39#include <sys/lock.h>
40#include <sys/proc.h>
41#include <sys/vnode.h>
42#include <sys/malloc.h>
43#include <sys/dirent.h>
44#include <sys/conf.h>
45#include <sys/tty.h>
46
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sysproto.h>
36#include <sys/fcntl.h>
37#include <sys/file.h>
38#include <sys/filedesc.h>
39#include <sys/lock.h>
40#include <sys/proc.h>
41#include <sys/vnode.h>
42#include <sys/malloc.h>
43#include <sys/dirent.h>
44#include <sys/conf.h>
45#include <sys/tty.h>
46
47#include <i386/linux/linux.h>
48#include <i386/linux/linux_proto.h>
49#include <i386/linux/linux_util.h>
47#include <machine/../linux/linux.h>
48#include <machine/../linux/linux_proto.h>
49#include <compat/linux/linux_util.h>
50
51int
52linux_creat(struct proc *p, struct linux_creat_args *args)
53{
54 struct open_args /* {
55 char *path;
56 int flags;
57 int mode;

--- 670 unchanged lines hidden (view full) ---

728#endif
729 bsd.path = args->path;
730 bsd.link = args->to;
731
732 return symlink(p, &bsd);
733}
734
735int
50
51int
52linux_creat(struct proc *p, struct linux_creat_args *args)
53{
54 struct open_args /* {
55 char *path;
56 int flags;
57 int mode;

--- 670 unchanged lines hidden (view full) ---

728#endif
729 bsd.path = args->path;
730 bsd.link = args->to;
731
732 return symlink(p, &bsd);
733}
734
735int
736linux_execve(struct proc *p, struct linux_execve_args *args)
737{
738 struct execve_args bsd;
739 caddr_t sg;
740
741 sg = stackgap_init();
742 CHECKALTEXIST(p, &sg, args->path);
743
744#ifdef DEBUG
745 printf("Linux-emul(%d): execve(%s)\n",
746 p->p_pid, args->path);
747#endif
748 bsd.fname = args->path;
749 bsd.argv = args->argp;
750 bsd.envv = args->envp;
751
752 return execve(p, &bsd);
753}
754
755int
756linux_readlink(struct proc *p, struct linux_readlink_args *args)
757{
758 struct readlink_args bsd;
759 caddr_t sg;
760
761 sg = stackgap_init();
762 CHECKALTEXIST(p, &sg, args->name);
763

--- 116 unchanged lines hidden ---
736linux_readlink(struct proc *p, struct linux_readlink_args *args)
737{
738 struct readlink_args bsd;
739 caddr_t sg;
740
741 sg = stackgap_init();
742 CHECKALTEXIST(p, &sg, args->name);
743

--- 116 unchanged lines hidden ---