ffs_alloc.c (7399) | ffs_alloc.c (8456) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94 |
34 * $Id: ffs_alloc.c,v 1.11 1995/03/19 14:29:11 davidg Exp $ | 34 * $Id: ffs_alloc.c,v 1.12 1995/03/26 23:29:09 davidg Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/proc.h> 41#include <sys/vnode.h> 42#include <sys/mount.h> --- 128 unchanged lines hidden (view full) --- 171 daddr_t bprev, bno; 172 173 *bpp = 0; 174 fs = ip->i_fs; 175#ifdef DIAGNOSTIC 176 if ((u_int)osize > fs->fs_bsize || fragoff(fs, osize) != 0 || 177 (u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { 178 printf( | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/proc.h> 41#include <sys/vnode.h> 42#include <sys/mount.h> --- 128 unchanged lines hidden (view full) --- 171 daddr_t bprev, bno; 172 173 *bpp = 0; 174 fs = ip->i_fs; 175#ifdef DIAGNOSTIC 176 if ((u_int)osize > fs->fs_bsize || fragoff(fs, osize) != 0 || 177 (u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { 178 printf( |
179 "dev = 0x%lx, bsize = %d, osize = %d, nsize = %d, fs = %s\n", 180 (u_long)ip->i_dev, fs->fs_bsize, osize, nsize, fs->fs_fsmnt); | 179 "dev = 0x%lx, bsize = %ld, osize = %d, " 180 "nsize = %d, fs = %s\n", 181 (u_long)ip->i_dev, fs->fs_bsize, osize, 182 nsize, fs->fs_fsmnt); |
181 panic("ffs_realloccg: bad size"); 182 } 183 if (cred == NOCRED) 184 panic("ffs_realloccg: missing credential"); 185#endif /* DIAGNOSTIC */ 186 if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0) 187 goto nospace; 188 if ((bprev = ip->i_db[lbprev]) == 0) { --- 1311 unchanged lines hidden --- | 183 panic("ffs_realloccg: bad size"); 184 } 185 if (cred == NOCRED) 186 panic("ffs_realloccg: missing credential"); 187#endif /* DIAGNOSTIC */ 188 if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0) 189 goto nospace; 190 if ((bprev = ip->i_db[lbprev]) == 0) { --- 1311 unchanged lines hidden --- |