ibcs2_misc.c (172930) | ibcs2_misc.c (175202) |
---|---|
1/*- 2 * Copyright (c) 1995 Steven Wallace 3 * Copyright (c) 1994, 1995 Scott Bartram 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 33 unchanged lines hidden (view full) --- 42 * SUCH DAMAGE. 43 * 44 * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp 45 * 46 * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93 47 */ 48 49#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1995 Steven Wallace 3 * Copyright (c) 1994, 1995 Scott Bartram 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 33 unchanged lines hidden (view full) --- 42 * SUCH DAMAGE. 43 * 44 * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp 45 * 46 * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93 47 */ 48 49#include <sys/cdefs.h> |
50__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_misc.c 172930 2007-10-24 19:04:04Z rwatson $"); | 50__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_misc.c 175202 2008-01-10 01:10:58Z attilio $"); |
51 52/* 53 * IBCS2 compatibility module. 54 * 55 * IBCS2 system calls that are implemented differently in BSD are 56 * handled here. 57 */ 58#include "opt_mac.h" --- 292 unchanged lines hidden (view full) --- 351 return (EINVAL); 352 } 353 354 off = fp->f_offset; 355#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */ 356 buflen = max(DIRBLKSIZ, uap->nbytes); 357 buflen = min(buflen, MAXBSIZE); 358 buf = malloc(buflen, M_TEMP, M_WAITOK); | 51 52/* 53 * IBCS2 compatibility module. 54 * 55 * IBCS2 system calls that are implemented differently in BSD are 56 * handled here. 57 */ 58#include "opt_mac.h" --- 292 unchanged lines hidden (view full) --- 351 return (EINVAL); 352 } 353 354 off = fp->f_offset; 355#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */ 356 buflen = max(DIRBLKSIZ, uap->nbytes); 357 buflen = min(buflen, MAXBSIZE); 358 buf = malloc(buflen, M_TEMP, M_WAITOK); |
359 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); | 359 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); |
360again: 361 aiov.iov_base = buf; 362 aiov.iov_len = buflen; 363 auio.uio_iov = &aiov; 364 auio.uio_iovcnt = 1; 365 auio.uio_rw = UIO_READ; 366 auio.uio_segflg = UIO_SYSSPACE; 367 auio.uio_td = td; --- 145 unchanged lines hidden (view full) --- 513 514 off = fp->f_offset; 515 516 DPRINTF(("ibcs2_read: read directory\n")); 517 518 buflen = max(DIRBLKSIZ, uap->nbytes); 519 buflen = min(buflen, MAXBSIZE); 520 buf = malloc(buflen, M_TEMP, M_WAITOK); | 360again: 361 aiov.iov_base = buf; 362 aiov.iov_len = buflen; 363 auio.uio_iov = &aiov; 364 auio.uio_iovcnt = 1; 365 auio.uio_rw = UIO_READ; 366 auio.uio_segflg = UIO_SYSSPACE; 367 auio.uio_td = td; --- 145 unchanged lines hidden (view full) --- 513 514 off = fp->f_offset; 515 516 DPRINTF(("ibcs2_read: read directory\n")); 517 518 buflen = max(DIRBLKSIZ, uap->nbytes); 519 buflen = min(buflen, MAXBSIZE); 520 buf = malloc(buflen, M_TEMP, M_WAITOK); |
521 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); | 521 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); |
522again: 523 aiov.iov_base = buf; 524 aiov.iov_len = buflen; 525 auio.uio_iov = &aiov; 526 auio.uio_iovcnt = 1; 527 auio.uio_rw = UIO_READ; 528 auio.uio_segflg = UIO_SYSSPACE; 529 auio.uio_td = td; --- 717 unchanged lines hidden --- | 522again: 523 aiov.iov_base = buf; 524 aiov.iov_len = buflen; 525 auio.uio_iov = &aiov; 526 auio.uio_iovcnt = 1; 527 auio.uio_rw = UIO_READ; 528 auio.uio_segflg = UIO_SYSSPACE; 529 auio.uio_td = td; --- 717 unchanged lines hidden --- |