ffs_rawread.c (112718) | ffs_rawread.c (112724) |
---|---|
1/*- 2 * Copyright (c) 2000-2003 Tor Egge 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2000-2003 Tor Egge 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/ufs/ffs/ffs_rawread.c 112718 2003-03-27 19:28:11Z tegge $ | 26 * $FreeBSD: head/sys/ufs/ffs/ffs_rawread.c 112724 2003-03-27 20:48:34Z tegge $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/fcntl.h> 32#include <sys/file.h> 33#include <sys/stat.h> 34#include <sys/proc.h> --- 207 unchanged lines hidden (view full) --- 242 } 243 244 if (bp->b_bcount + blockoff * DEV_BSIZE > bsize * (1 + bforwards)) 245 bp->b_bcount = bsize * (1 + bforwards) - blockoff * DEV_BSIZE; 246 bp->b_bufsize = bp->b_bcount; 247 bp->b_blkno += blockoff; 248 bp->b_dev = dp->v_rdev; 249 | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/fcntl.h> 32#include <sys/file.h> 33#include <sys/stat.h> 34#include <sys/proc.h> --- 207 unchanged lines hidden (view full) --- 242 } 243 244 if (bp->b_bcount + blockoff * DEV_BSIZE > bsize * (1 + bforwards)) 245 bp->b_bcount = bsize * (1 + bforwards) - blockoff * DEV_BSIZE; 246 bp->b_bufsize = bp->b_bcount; 247 bp->b_blkno += blockoff; 248 bp->b_dev = dp->v_rdev; 249 |
250 vmapbuf(bp); 251 if (vmapbuf < 0) | 250 if (vmapbuf(bp) < 0) |
252 return EFAULT; 253 254 if (dp->v_type == VCHR) 255 (void) VOP_SPECSTRATEGY(dp, bp); 256 else 257 (void) VOP_STRATEGY(dp, bp); 258 return 0; 259} --- 235 unchanged lines hidden --- | 251 return EFAULT; 252 253 if (dp->v_type == VCHR) 254 (void) VOP_SPECSTRATEGY(dp, bp); 255 else 256 (void) VOP_STRATEGY(dp, bp); 257 return 0; 258} --- 235 unchanged lines hidden --- |