diff options
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_subr.c | 4 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vnops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 28 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_subr.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_tables.c | 5 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 5 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 6 |
9 files changed, 35 insertions, 31 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c index 36f352035ba..5df7f924e08 100644 --- a/sys/ufs/ext2fs/ext2fs_subr.c +++ b/sys/ufs/ext2fs/ext2fs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_subr.c,v 1.24 2011/07/02 15:52:25 thib Exp $ */ +/* $OpenBSD: ext2fs_subr.c,v 1.25 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */ /* @@ -115,7 +115,7 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip) if (ep == bp || (ep->b_flags & B_INVAL) || ep->b_vp == NULLVP) continue; - if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, (daddr64_t)0, NULL)) + if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, NULL, NULL)) continue; if (vp != ip->i_devvp) continue; diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 7678e666efa..3a18587d2be 100644 --- a/sys/ufs/ext2fs/ext2fs_vfsops.c +++ b/sys/ufs/ext2fs/ext2fs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vfsops.c,v 1.60 2011/06/30 15:08:59 jsing Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.61 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -143,11 +143,11 @@ ext2fs_mountroot(void) fs = ump->um_e2fs; bzero(fs->e2fs_fsmnt, sizeof(fs->e2fs_fsmnt)); (void)copystr(mp->mnt_stat.f_mntonname, fs->e2fs_fsmnt, - sizeof(fs->e2fs_fsmnt) - 1, 0); + sizeof(fs->e2fs_fsmnt) - 1, NULL); if (fs->e2fs.e2fs_rev > E2FS_REV0) { bzero(fs->e2fs.e2fs_fsmnt, sizeof(fs->e2fs.e2fs_fsmnt)); (void)copystr(mp->mnt_stat.f_mntonname, fs->e2fs.e2fs_fsmnt, - sizeof(fs->e2fs.e2fs_fsmnt) - 1, 0); + sizeof(fs->e2fs.e2fs_fsmnt) - 1, NULL); } (void)ext2fs_statfs(mp, &mp->mnt_stat, p); vfs_unbusy(mp); diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index fd3331a80d9..9a4c310ea45 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.59 2011/04/05 14:14:07 thib Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.60 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -119,7 +119,7 @@ ext2fs_mknod(void *v) vput(*vpp); (*vpp)->v_type = VNON; vgone(*vpp); - *vpp = 0; + *vpp = NULL; return (0); } diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 881996c1bc2..231f58d5c8d 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.89 2010/07/13 18:52:25 otto Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.90 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -583,7 +583,7 @@ ffs2_reallocblks(void *v) struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; - daddr64_t *bap, *sbap, *ebap = 0; + daddr64_t *bap, *sbap, *ebap = NULL; struct cluster_save *buflist; daddr64_t start_lbn, end_lbn; daddr64_t soff, newblk, blkno, pref; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index d2625559634..75e0587d279 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.104 2011/06/29 12:15:26 tedu Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.105 2011/07/03 18:23:10 tedu Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -734,7 +734,7 @@ process_worklist_item(struct mount *matchmnt, int flags) if (vp == NULL || !VOP_ISLOCKED(vp)) break; } - if (wk == 0) { + if (wk == NULL) { FREE_LOCK(&lk); return (0); } @@ -826,11 +826,11 @@ softdep_move_dependencies(struct buf *oldbp, struct buf *newbp) if (LIST_FIRST(&newbp->b_dep) != NULL) panic("softdep_move_dependencies: need merge code"); - wktail = 0; + wktail = NULL; ACQUIRE_LOCK(&lk); while ((wk = LIST_FIRST(&oldbp->b_dep)) != NULL) { LIST_REMOVE(wk, wk_list); - if (wktail == 0) + if (wktail == NULL) LIST_INSERT_HEAD(&newbp->b_dep, wk, wk_list); else LIST_INSERT_AFTER(wktail, wk, wk_list); @@ -1123,7 +1123,7 @@ top: *newblkpp = NULL; return (0); } - if (sema_get(&newblk_in_progress, 0) == 0) + if (sema_get(&newblk_in_progress, NULL) == 0) goto top; newblk = pool_get(&newblk_pool, PR_WAITOK); newblk->nb_state = 0; @@ -1167,7 +1167,7 @@ softdep_initialize(void) sema_init(&inodedep_in_progress, "inodedep", PRIBIO, 0); newblk_hashtbl = hashinit(64, M_NEWBLK, M_WAITOK, &newblk_hash); sema_init(&newblk_in_progress, "newblk", PRIBIO, 0); - timeout_set(&proc_waiting_timeout, pause_timer, 0); + timeout_set(&proc_waiting_timeout, pause_timer, NULL); pool_init(&pagedep_pool, sizeof(struct pagedep), 0, 0, 0, "pagedeppl", &pool_allocator_nointr); pool_init(&inodedep_pool, sizeof(struct inodedep), 0, 0, 0, @@ -1959,7 +1959,7 @@ softdep_setup_freeblocks(struct inode *ip, off_t length) * been written to disk, so we can free any fragments without delay. */ merge_inode_lists(inodedep); - while ((adp = TAILQ_FIRST(&inodedep->id_inoupdt)) != 0) + while ((adp = TAILQ_FIRST(&inodedep->id_inoupdt)) != NULL) free_allocdirect(&inodedep->id_inoupdt, adp, delay); FREE_LOCK(&lk); bdwrite(bp); @@ -2050,7 +2050,7 @@ deallocate_dependencies(struct buf *bp, struct inodedep *inodedep) panic("deallocate_dependencies: already gone"); } indirdep->ir_state |= GOINGAWAY; - while ((aip = LIST_FIRST(&indirdep->ir_deplisthd)) != 0) + while ((aip = LIST_FIRST(&indirdep->ir_deplisthd))) free_allocindir(aip, inodedep); if (bp->b_lblkno >= 0 || bp->b_blkno != indirdep->ir_savebp->b_lblkno) { @@ -2073,7 +2073,7 @@ deallocate_dependencies(struct buf *bp, struct inodedep *inodedep) while ((dap = LIST_FIRST(&pagedep->pd_diraddhd[i]))) free_diradd(dap); - while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != 0) + while ((dap = LIST_FIRST(&pagedep->pd_pendinghd))) free_diradd(dap); /* * Copy any directory remove dependencies to the list @@ -3831,10 +3831,10 @@ softdep_disk_write_complete(struct buf *bp) panic("disk_write_complete: indirdep gone"); bcopy(indirdep->ir_saveddata, bp->b_data, bp->b_bcount); free(indirdep->ir_saveddata, M_INDIRDEP); - indirdep->ir_saveddata = 0; + indirdep->ir_saveddata = NULL; indirdep->ir_state &= ~UNDONE; indirdep->ir_state |= ATTACHED; - while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != 0) { + while ((aip = LIST_FIRST(&indirdep->ir_donehd))) { handle_allocindir_partdone(aip); if (aip == LIST_FIRST(&indirdep->ir_donehd)) panic("disk_write_complete: not gone"); @@ -4173,7 +4173,8 @@ handle_written_inodeblock(struct inodedep *inodedep, struct buf *bp) /* * If no outstanding dependencies, free it. */ - if (free_inodedep(inodedep) || TAILQ_FIRST(&inodedep->id_inoupdt) == 0) + if (free_inodedep(inodedep) || + TAILQ_FIRST(&inodedep->id_inoupdt) == NULL) return (0); return (hadchanges); } @@ -4799,7 +4800,8 @@ loop: */ pagedep = WK_PAGEDEP(wk); for (i = 0; i < DAHASHSZ; i++) { - if (LIST_FIRST(&pagedep->pd_diraddhd[i]) == 0) + if (LIST_FIRST(&pagedep->pd_diraddhd[i]) == + NULL) continue; if ((error = flush_pagedep_deps(vp, pagedep->pd_mnt, diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 9285b22c5f1..7270b7d97e8 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_subr.c,v 1.24 2009/08/14 13:05:08 jasper Exp $ */ +/* $OpenBSD: ffs_subr.c,v 1.25 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */ /* @@ -133,7 +133,7 @@ ffs_checkoverlap(struct buf *bp, struct inode *ip) if (ep == bp || (ep->b_flags & B_INVAL) || ep->b_vp == NULLVP) continue; - if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, (daddr64_t)0, NULL)) + if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, NULL, NULL)) continue; if (vp != ip->i_devvp) continue; diff --git a/sys/ufs/ffs/ffs_tables.c b/sys/ufs/ffs/ffs_tables.c index 9ab52b5c43b..c3a37b4fcb7 100644 --- a/sys/ufs/ffs/ffs_tables.c +++ b/sys/ufs/ffs/ffs_tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_tables.c,v 1.5 2003/08/26 16:10:57 mickey Exp $ */ +/* $OpenBSD: ffs_tables.c,v 1.6 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ffs_tables.c,v 1.2 1994/06/29 06:46:35 cgd Exp $ */ /* @@ -132,5 +132,6 @@ const u_char fragtbl8[256] = { * The actual fragtbl array. */ const u_char *fragtbl[MAXFRAG + 1] = { - 0, fragtbl124, fragtbl124, 0, fragtbl124, 0, 0, 0, fragtbl8, + NULL, fragtbl124, fragtbl124, NULL, fragtbl124, NULL, NULL, NULL, + fragtbl8, }; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 7e9adadbcd0..4514f28eb76 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.130 2011/07/02 16:23:47 krw Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.131 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -149,7 +149,8 @@ ffs_mountroot(void) CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list); ump = VFSTOUFS(mp); fs = ump->um_fs; - (void) copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0); + (void)copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, + NULL); (void)ffs_statfs(mp, &mp->mnt_stat, p); vfs_unbusy(mp); inittodr(fs->fs_time); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8b72e4d7da8..2354c7244a3 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.99 2011/07/02 22:20:08 nicm Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.100 2011/07/03 18:23:10 tedu Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -160,7 +160,7 @@ ufs_mknod(void *v) vput(*vpp); (*vpp)->v_type = VNON; vgone(*vpp); - *vpp = 0; + *vpp = NULL; return (0); } @@ -1248,7 +1248,7 @@ ufs_rmdir(void *v) /* * No rmdir "." or of mounted on directories. */ - if (dp == ip || vp->v_mountedhere != 0) { + if (dp == ip || vp->v_mountedhere != NULL) { if (dp == ip) vrele(dvp); else |