ibcs2_misc.c (109153) | ibcs2_misc.c (109623) |
---|---|
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 --- 31 unchanged lines hidden (view full) --- 40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 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 * | 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 --- 31 unchanged lines hidden (view full) --- 40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 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 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_misc.c 109153 2003-01-13 00:33:17Z dillon $ | 48 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_misc.c 109623 2003-01-21 08:56:16Z alfred $ |
49 */ 50 51/* 52 * IBCS2 compatibility module. 53 * 54 * IBCS2 system calls that are implemented differently in BSD are 55 * handled here. 56 */ --- 271 unchanged lines hidden (view full) --- 328 fdrop(fp, td); 329 return (EINVAL); 330 } 331 332 off = fp->f_offset; 333#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */ 334 buflen = max(DIRBLKSIZ, uap->nbytes); 335 buflen = min(buflen, MAXBSIZE); | 49 */ 50 51/* 52 * IBCS2 compatibility module. 53 * 54 * IBCS2 system calls that are implemented differently in BSD are 55 * handled here. 56 */ --- 271 unchanged lines hidden (view full) --- 328 fdrop(fp, td); 329 return (EINVAL); 330 } 331 332 off = fp->f_offset; 333#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */ 334 buflen = max(DIRBLKSIZ, uap->nbytes); 335 buflen = min(buflen, MAXBSIZE); |
336 buf = malloc(buflen, M_TEMP, M_WAITOK); | 336 buf = malloc(buflen, M_TEMP, 0); |
337 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); 338again: 339 aiov.iov_base = buf; 340 aiov.iov_len = buflen; 341 auio.uio_iov = &aiov; 342 auio.uio_iovcnt = 1; 343 auio.uio_rw = UIO_READ; 344 auio.uio_segflg = UIO_SYSSPACE; --- 144 unchanged lines hidden (view full) --- 489 off = fp->f_offset; 490 if (vp->v_type != VDIR) 491 return read(td, (struct read_args *)uap); 492 493 DPRINTF(("ibcs2_read: read directory\n")); 494 495 buflen = max(DIRBLKSIZ, uap->nbytes); 496 buflen = min(buflen, MAXBSIZE); | 337 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); 338again: 339 aiov.iov_base = buf; 340 aiov.iov_len = buflen; 341 auio.uio_iov = &aiov; 342 auio.uio_iovcnt = 1; 343 auio.uio_rw = UIO_READ; 344 auio.uio_segflg = UIO_SYSSPACE; --- 144 unchanged lines hidden (view full) --- 489 off = fp->f_offset; 490 if (vp->v_type != VDIR) 491 return read(td, (struct read_args *)uap); 492 493 DPRINTF(("ibcs2_read: read directory\n")); 494 495 buflen = max(DIRBLKSIZ, uap->nbytes); 496 buflen = min(buflen, MAXBSIZE); |
497 buf = malloc(buflen, M_TEMP, M_WAITOK); | 497 buf = malloc(buflen, M_TEMP, 0); |
498 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); 499again: 500 aiov.iov_base = buf; 501 aiov.iov_len = buflen; 502 auio.uio_iov = &aiov; 503 auio.uio_iovcnt = 1; 504 auio.uio_rw = UIO_READ; 505 auio.uio_segflg = UIO_SYSSPACE; --- 707 unchanged lines hidden --- | 498 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); 499again: 500 aiov.iov_base = buf; 501 aiov.iov_len = buflen; 502 auio.uio_iov = &aiov; 503 auio.uio_iovcnt = 1; 504 auio.uio_rw = UIO_READ; 505 auio.uio_segflg = UIO_SYSSPACE; --- 707 unchanged lines hidden --- |