Deleted Added
full compact
linux_file.c (109153) linux_file.c (109623)
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 109153 2003-01-13 00:33:17Z dillon $
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 109623 2003-01-21 08:56:16Z alfred $
29 */
30
31#include "opt_compat.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/conf.h>

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

292 justone = 1;
293 } else
294 justone = 0;
295
296 off = fp->f_offset;
297
298 buflen = max(LINUX_DIRBLKSIZ, nbytes);
299 buflen = min(buflen, MAXBSIZE);
29 */
30
31#include "opt_compat.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/conf.h>

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

292 justone = 1;
293 } else
294 justone = 0;
295
296 off = fp->f_offset;
297
298 buflen = max(LINUX_DIRBLKSIZ, nbytes);
299 buflen = min(buflen, MAXBSIZE);
300 buf = malloc(buflen, M_TEMP, M_WAITOK);
300 buf = malloc(buflen, M_TEMP, 0);
301 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
302
303again:
304 aiov.iov_base = buf;
305 aiov.iov_len = buflen;
306 auio.uio_iov = &aiov;
307 auio.uio_iovcnt = 1;
308 auio.uio_rw = UIO_READ;

--- 827 unchanged lines hidden ---
301 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
302
303again:
304 aiov.iov_base = buf;
305 aiov.iov_len = buflen;
306 auio.uio_iov = &aiov;
307 auio.uio_iovcnt = 1;
308 auio.uio_rw = UIO_READ;

--- 827 unchanged lines hidden ---