Deleted Added
full compact
linux_file.c (76166) linux_file.c (82518)
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 76166 2001-05-01 08:13:21Z markm $
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 82518 2001-08-29 19:05:27Z gallatin $
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/conf.h>
36#include <sys/dirent.h>

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

825#endif
826
827 bsd.path = args->path;
828 bsd.link = args->to;
829
830 return link(p, &bsd);
831}
832
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/conf.h>
36#include <sys/dirent.h>

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

825#endif
826
827 bsd.path = args->path;
828 bsd.link = args->to;
829
830 return link(p, &bsd);
831}
832
833int
834linux_getcwd(struct proc *p, struct linux_getcwd_args *args)
835{
836 struct __getcwd_args bsd;
837 caddr_t sg;
838 int error, len;
839
840#ifdef DEBUG
841 if (ldebug(getcwd))
842 printf(ARGS(getcwd, "%p, %ld"), args->buf, args->bufsize);
843#endif
844
845 sg = stackgap_init();
846 bsd.buf = stackgap_alloc(&sg, SPARE_USRSPACE);
847 bsd.buflen = SPARE_USRSPACE;
848 error = __getcwd(p, &bsd);
849 if (!error) {
850 len = strlen(bsd.buf) + 1;
851 if (len <= args->bufsize) {
852 p->p_retval[0] = len;
853 error = copyout(bsd.buf, args->buf, len);
854 }
855 else
856 error = ERANGE;
857 }
858 return (error);
859}
860
861#ifndef __alpha__
862int
863linux_fdatasync(p, uap)
864 struct proc *p;
865 struct linux_fdatasync_args *uap;
866{
867 struct fsync_args bsd;
868

--- 117 unchanged lines hidden ---
833#ifndef __alpha__
834int
835linux_fdatasync(p, uap)
836 struct proc *p;
837 struct linux_fdatasync_args *uap;
838{
839 struct fsync_args bsd;
840

--- 117 unchanged lines hidden ---