Deleted Added
full compact
linux_file.c (182892) linux_file.c (188572)
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

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

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
29#include <sys/cdefs.h>
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

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

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
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 182892 2008-09-09 16:00:17Z rdivacky $");
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 188572 2009-02-13 11:55:19Z netchild $");
31
32#include "opt_compat.h"
33#include "opt_mac.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/conf.h>
38#include <sys/dirent.h>

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

340 u_long *cookies = NULL, *cookiep;
341 int ncookies, vfslocked;
342
343 nbytes = args->count;
344 if (nbytes == 1) {
345 /* readdir(2) case. Always struct dirent. */
346 if (is64bit)
347 return (EINVAL);
31
32#include "opt_compat.h"
33#include "opt_mac.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/conf.h>
38#include <sys/dirent.h>

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

340 u_long *cookies = NULL, *cookiep;
341 int ncookies, vfslocked;
342
343 nbytes = args->count;
344 if (nbytes == 1) {
345 /* readdir(2) case. Always struct dirent. */
346 if (is64bit)
347 return (EINVAL);
348 nbytes = sizeof(linux_dirent);
348 nbytes = sizeof(*linux_dirent);
349 justone = 1;
350 } else
351 justone = 0;
352
353 if ((error = getvnode(td->td_proc->p_fd, args->fd, &fp)) != 0)
354 return (error);
355
356 if ((fp->f_flag & FREAD) == 0) {

--- 1170 unchanged lines hidden ---
349 justone = 1;
350 } else
351 justone = 0;
352
353 if ((error = getvnode(td->td_proc->p_fd, args->fd, &fp)) != 0)
354 return (error);
355
356 if ((fp->f_flag & FREAD) == 0) {

--- 1170 unchanged lines hidden ---