Deleted Added
full compact
linux_file.c (11418) linux_file.c (12458)
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 * $Id: linux_file.c,v 1.2 1995/08/28 00:50:08 swallace Exp $
28 * $Id: linux_file.c,v 1.3 1995/10/10 23:13:27 swallace Exp $
29 */
30
29 */
30
31#include <i386/linux/linux.h>
32#include <sys/param.h>
33#include <sys/systm.h>
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>
36#include <sys/filedesc.h>
37#include <sys/proc.h>
38#include <sys/ioctl.h>
39#include <sys/stat.h>
40#include <sys/vnode.h>
41#include <sys/malloc.h>
42#include <sys/exec.h>
43#include <sys/dirent.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>
36#include <sys/filedesc.h>
37#include <sys/proc.h>
38#include <sys/ioctl.h>
39#include <sys/stat.h>
40#include <sys/vnode.h>
41#include <sys/malloc.h>
42#include <sys/exec.h>
43#include <sys/dirent.h>
44#include <vm/vm.h>
44
45#include <ufs/ufs/dir.h>
46
45#include <ufs/ufs/dir.h>
46
47#include <i386/linux/linux.h>
48#include <i386/linux/sysproto.h>
47
48struct linux_creat_args {
49 char *path;
50 int mode;
51};
52
53int
54linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)

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

381 auio.uio_iov = &aiov;
382 auio.uio_iovcnt = 1;
383 auio.uio_rw = UIO_READ;
384 auio.uio_segflg = UIO_SYSSPACE;
385 auio.uio_procp = p;
386 auio.uio_resid = buflen;
387 auio.uio_offset = off - (off_t)blockoff;
388
49
50struct linux_creat_args {
51 char *path;
52 int mode;
53};
54
55int
56linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)

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

383 auio.uio_iov = &aiov;
384 auio.uio_iovcnt = 1;
385 auio.uio_rw = UIO_READ;
386 auio.uio_segflg = UIO_SYSSPACE;
387 auio.uio_procp = p;
388 auio.uio_resid = buflen;
389 auio.uio_offset = off - (off_t)blockoff;
390
389 error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, 0, 0);
391 error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, (int *) NULL,
392 (u_int **) NULL);
390 if (error) {
391 goto out;
392}
393
394 inp = buf;
395 inp += blockoff;
396 outp = (caddr_t) args->dent;
397 resid = nbytes;

--- 54 unchanged lines hidden ---
393 if (error) {
394 goto out;
395}
396
397 inp = buf;
398 inp += blockoff;
399 outp = (caddr_t) args->dent;
400 resid = nbytes;

--- 54 unchanged lines hidden ---