Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs add spaces for KNF. confirmed to produce identi...



details:   https://anonhg.NetBSD.org/src/rev/efbd9315f58b
branches:  trunk
changeset: 518057:efbd9315f58b
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Nov 23 21:44:25 2001 +0000

description:
add spaces for KNF.  confirmed to produce identical objects.

diffstat:

 sys/ufs/lfs/lfs.h          |   18 ++--
 sys/ufs/lfs/lfs_alloc.c    |   22 +++---
 sys/ufs/lfs/lfs_balloc.c   |   10 +-
 sys/ufs/lfs/lfs_bio.c      |   38 +++++-----
 sys/ufs/lfs/lfs_debug.c    |   22 +++---
 sys/ufs/lfs/lfs_inode.c    |   14 +-
 sys/ufs/lfs/lfs_segment.c  |  160 ++++++++++++++++++++++----------------------
 sys/ufs/lfs/lfs_subr.c     |    6 +-
 sys/ufs/lfs/lfs_syscalls.c |  118 ++++++++++++++++----------------
 sys/ufs/lfs/lfs_vfsops.c   |   76 ++++++++++----------
 sys/ufs/lfs/lfs_vnops.c    |   24 +++---
 11 files changed, 254 insertions(+), 254 deletions(-)

diffs (truncated from 1843 to 300 lines):

diff -r af910cc5aad5 -r efbd9315f58b sys/ufs/lfs/lfs.h
--- a/sys/ufs/lfs/lfs.h Fri Nov 23 21:23:30 2001 +0000
+++ b/sys/ufs/lfs/lfs.h Fri Nov 23 21:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs.h,v 1.37 2001/07/13 20:30:22 perseant Exp $        */
+/*     $NetBSD: lfs.h,v 1.38 2001/11/23 21:44:25 chs Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
 #define BW_CLEAN       1
 #define MIN_FREE_SEGS  2
 #define LFS_MAX_ACTIVE 10
-#define LFS_MAXDIROP   (desiredvnodes>>2)
+#define LFS_MAXDIROP   (desiredvnodes >> 2)
 #ifndef LFS_ATIME_IFILE
 # define LFS_ATIME_IFILE 0
 #endif
@@ -107,7 +107,7 @@
                locked_queue_bytes += bp->b_bufsize;                    \
        }                                                               \
        (bp)->b_flags |= B_LOCKED;                                      \
-} while(0)
+} while (0)
 
 #define LFS_UNLOCK_BUF(bp) do {                                                \
        if (((bp)->b_flags & (B_LOCKED | B_CALL)) == B_LOCKED) {        \
@@ -118,7 +118,7 @@
                        wakeup(&locked_queue_count);                    \
        }                                                               \
        (bp)->b_flags &= ~B_LOCKED;                                     \
-} while(0)
+} while (0)
 
 /* For convenience */
 #define IN_ALLMOD (IN_MODIFIED|IN_ACCESS|IN_CHANGE|IN_UPDATE|IN_ACCESSED|IN_CLEANING)
@@ -131,7 +131,7 @@
         if (((flags) & IN_MODIFIED) && !((ip)->i_flag & IN_MODIFIED))   \
                 ++(ip)->i_lfs->lfs_uinodes;                             \
         (ip)->i_flag |= (flags);                                        \
-} while(0)
+} while (0)
 
 #define LFS_CLR_UINO(ip, flags) do {                                    \
         if (((flags) & IN_ACCESSED) && ((ip)->i_flag & IN_ACCESSED))    \
@@ -144,7 +144,7 @@
        if ((ip)->i_lfs->lfs_uinodes < 0) {                             \
                panic("lfs_uinodes < 0");                               \
        }                                                               \
-} while(0)
+} while (0)
 
 #define LFS_ITIMES(ip, acc, mod, cre)  do {                            \
                if ((ip)->i_flag & IN_ACCESS) {                                 \
@@ -175,7 +175,7 @@
                LFS_SET_UINO(ip, IN_MODIFIED);                          \
        }                                                               \
        (ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE);           \
-} while(0)
+} while (0)
 
 #define WRITEINPROG(vp) (vp->v_dirtyblkhd.lh_first && !(VTOI(vp)->i_flag & \
                                (IN_MODIFIED | IN_ACCESSED | IN_CLEANING)))
@@ -587,7 +587,7 @@
        (void) VOP_BWRITE(bp); /* Ifile */                       \
     } else                                                       \
        brelse(bp);                                              \
-} while(0)
+} while (0)
 
 #define LFS_GET_HEADFREE(FS, CIP, BP, FREEP) do {                       \
        if ((FS)->lfs_version > 1) {                                    \
@@ -631,7 +631,7 @@
        (IN) / (F)->lfs_ifpb + (F)->lfs_cleansz + (F)->lfs_segtabsz,    \
        (F)->lfs_bsize, NOCRED, &(BP))) != 0)                           \
                panic("lfs: ifile read %d", _e);                        \
-       if((F)->lfs_version == 1)                                       \
+       if ((F)->lfs_version == 1)                                      \
                (IP) = (IFILE *)((IFILE_V1 *)(BP)->b_data + (IN) % (F)->lfs_ifpb); \
        else                                                            \
                (IP) = (IFILE *)(BP)->b_data + (IN) % (F)->lfs_ifpb;    \
diff -r af910cc5aad5 -r efbd9315f58b sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c   Fri Nov 23 21:23:30 2001 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c   Fri Nov 23 21:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_alloc.c,v 1.52 2001/11/08 02:39:09 lukem Exp $     */
+/*     $NetBSD: lfs_alloc.c,v 1.53 2001/11/23 21:44:26 chs Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.52 2001/11/08 02:39:09 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.53 2001/11/23 21:44:26 chs Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -169,7 +169,7 @@
                LFS_PUT_HEADFREE(fs, cip, cbp, oldnext);
        } else {
                tino = ino;
-               while(1) {
+               while (1) {
                        LFS_IENTRY(ifp, fs, tino, bp);
                        if (ifp->if_nextfree == ino ||
                            ifp->if_nextfree == LFS_UNUSED_INUM)
@@ -244,13 +244,13 @@
        LFS_GET_HEADFREE(fs, cip, cbp, &oldlast);
        LFS_PUT_HEADFREE(fs, cip, cbp, i);
 #ifdef DIAGNOSTIC
-       if(fs->lfs_free == LFS_UNUSED_INUM)
+       if (fs->lfs_free == LFS_UNUSED_INUM)
                panic("inode 0 allocated [2]");
 #endif /* DIAGNOSTIC */
        max = i + fs->lfs_ifpb;
        /* printf("extend ifile for ino %d--%d\n", i, max); */
 
-       if(fs->lfs_version == 1) {
+       if (fs->lfs_version == 1) {
                for (ifp_v1 = (IFILE_V1 *)bp->b_data; i < max; ++ifp_v1) {
                        ifp_v1->if_version = 1;
                        ifp_v1->if_daddr = LFS_UNUSED_DADDR;
@@ -315,7 +315,7 @@
        LFS_GET_HEADFREE(fs, cip, cbp, &new_ino);
 
 #ifdef DIAGNOSTIC
-       if(new_ino == LFS_UNUSED_INUM) {
+       if (new_ino == LFS_UNUSED_INUM) {
 #ifdef DEBUG
                lfs_dump_super(fs);
 #endif /* DEBUG */
@@ -350,7 +350,7 @@
                }
        }
 #ifdef DIAGNOSTIC
-       if(fs->lfs_free == LFS_UNUSED_INUM)
+       if (fs->lfs_free == LFS_UNUSED_INUM)
                panic("inode 0 allocated [3]");
 #endif /* DIAGNOSTIC */
 
@@ -403,13 +403,13 @@
        uvm_vnp_setsize(vp, 0);
        *vpp = vp;
 #if 1
-       if(!(vp->v_flag & VDIROP)) {
+       if (!(vp->v_flag & VDIROP)) {
                (void)lfs_vref(vp);
                ++lfs_dirvcount;
        }
        vp->v_flag |= VDIROP;
 
-       if(!(ip->i_flag & IN_ADIROP))
+       if (!(ip->i_flag & IN_ADIROP))
                ++fs->lfs_nadirop;
        ip->i_flag |= IN_ADIROP;
 #endif
@@ -506,7 +506,7 @@
        else
                lockmgr(&fs->lfs_freelock, LK_EXCLUSIVE, 0);
        
-       if(vp->v_flag & VDIROP) {
+       if (vp->v_flag & VDIROP) {
                --lfs_dirvcount;
                vp->v_flag &= ~VDIROP;
                wakeup(&lfs_dirvcount);
@@ -548,7 +548,7 @@
                LFS_PUT_TAILFREE(fs, cip, cbp, ino);
        }
 #ifdef DIAGNOSTIC
-       if(ino == LFS_UNUSED_INUM) {
+       if (ino == LFS_UNUSED_INUM) {
                panic("inode 0 freed");
        }
 #endif /* DIAGNOSTIC */
diff -r af910cc5aad5 -r efbd9315f58b sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c  Fri Nov 23 21:23:30 2001 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c  Fri Nov 23 21:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_balloc.c,v 1.30 2001/11/08 02:39:09 lukem Exp $    */
+/*     $NetBSD: lfs_balloc.c,v 1.31 2001/11/23 21:44:26 chs Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.30 2001/11/08 02:39:09 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.31 2001/11/23 21:44:26 chs Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -169,7 +169,7 @@
                        if ((error = lfs_fragextend(vp, osize, fs->lfs_bsize,
                                                    lastblock, &bp,
                                                    ap->a_cred)))
-                               return(error);
+                               return (error);
                        ip->i_ffs_size = (lastblock + 1) * fs->lfs_bsize;
                        uvm_vnp_setsize(vp, ip->i_ffs_size);
                        ip->i_flag |= IN_CHANGE | IN_UPDATE;
@@ -263,7 +263,7 @@
                         * If that is the case mark it UNWRITTEN to keep
                         * the accounting straight.
                         */
-                       if (((daddr_t *)ibp->b_data)[indirs[i].in_off]==0)
+                       if (((daddr_t *)ibp->b_data)[indirs[i].in_off] == 0)
                                ((daddr_t *)ibp->b_data)[indirs[i].in_off] =
                                        UNWRITTEN;
                        idaddr = ((daddr_t *)ibp->b_data)[indirs[i].in_off];
@@ -326,7 +326,7 @@
                        bp->b_blkno = daddr;
                        bp->b_flags |= B_READ;
                        VOP_STRATEGY(bp);
-                       return(biowait(bp));
+                       return (biowait(bp));
                }
        }
        
diff -r af910cc5aad5 -r efbd9315f58b sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c     Fri Nov 23 21:23:30 2001 +0000
+++ b/sys/ufs/lfs/lfs_bio.c     Fri Nov 23 21:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_bio.c,v 1.39 2001/11/08 02:39:10 lukem Exp $       */
+/*     $NetBSD: lfs_bio.c,v 1.40 2001/11/23 21:44:26 chs Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.39 2001/11/08 02:39:10 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.40 2001/11/23 21:44:26 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -165,7 +165,7 @@
  * Also, we don't let blocks that have come to us from the cleaner
  * run out of space.
  */
-#define CANT_WAIT(BP,F) (IS_IFILE((BP)) || (BP)->b_lblkno<0 || ((F) & BW_CLEAN))
+#define CANT_WAIT(BP,F) (IS_IFILE((BP)) || (BP)->b_lblkno < 0 || ((F) & BW_CLEAN))
 
 int
 lfs_bwrite(void *v)
@@ -253,10 +253,10 @@
         * Don't write *any* blocks if we're mounted read-only.
         * In particular the cleaner can't write blocks either.
         */
-        if(VTOI(bp->b_vp)->i_lfs->lfs_ronly) {
+        if (VTOI(bp->b_vp)->i_lfs->lfs_ronly) {
                bp->b_flags &= ~(B_DELWRI | B_READ | B_ERROR);
                LFS_UNLOCK_BUF(bp);
-               if(bp->b_flags & B_CALL)
+               if (bp->b_flags & B_CALL)
                        bp->b_flags &= ~B_BUSY;
                else
                        brelse(bp);
@@ -306,7 +306,7 @@
 
        }
        
-       if(bp->b_flags & B_CALL)
+       if (bp->b_flags & B_CALL)
                bp->b_flags &= ~B_BUSY;
        else
                brelse(bp);
@@ -317,7 +317,7 @@
 void
 lfs_flush_fs(struct lfs *fs, int flags)
 {
-       if(fs->lfs_ronly == 0 && fs->lfs_dirops == 0)
+       if (fs->lfs_ronly == 0 && fs->lfs_dirops == 0)
        {
                /* disallow dirops during flush */
                fs->lfs_writer++;
@@ -331,12 +331,12 @@
                 * count to reflect these new writes
                 * after the segwrite completes.
                 */
-               if(lfs_dostats)
+               if (lfs_dostats)
                        ++lfs_stats.flush_invoked;
                lfs_segwrite(fs->lfs_ivnode->v_mount, flags);
 
                /* XXX KS - allow dirops again */
-               if(--fs->lfs_writer==0)
+               if (--fs->lfs_writer == 0)
                        wakeup(&fs->lfs_dirops);
        }
 }
@@ -355,9 +355,9 @@
        int s;
        struct mount *mp, *nmp;
        
-       if(lfs_dostats) 
+       if (lfs_dostats) 



Home | Main Index | Thread Index | Old Index