Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_ffs fsck_ffs(8): Fix whitespace issues.



details:   https://anonhg.NetBSD.org/src/rev/3b5c15df676a
branches:  trunk
changeset: 377269:3b5c15df676a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 04 20:40:53 2023 +0000

description:
fsck_ffs(8): Fix whitespace issues.

- Nix trailing whitespace.
- Omit excessive blank lines.
- Insert missing blank lines between $NetBSD$ and copyright.

No functional change intended.

diffstat:

 sbin/fsck_ffs/dir.c       |  16 ++++++++--------
 sbin/fsck_ffs/extern.h    |   3 +--
 sbin/fsck_ffs/fsck.h      |   9 ++++-----
 sbin/fsck_ffs/inode.c     |  16 ++++++++--------
 sbin/fsck_ffs/main.c      |   7 +++----
 sbin/fsck_ffs/pass1.c     |  10 +++++-----
 sbin/fsck_ffs/pass2.c     |  10 +++++-----
 sbin/fsck_ffs/pass4.c     |   6 +++---
 sbin/fsck_ffs/pass5.c     |   6 +++---
 sbin/fsck_ffs/pass6.c     |   6 +++---
 sbin/fsck_ffs/quota2.c    |  19 ++++++++++---------
 sbin/fsck_ffs/setup.c     |  21 ++++++++++-----------
 sbin/fsck_ffs/utilities.c |  16 ++++++++--------
 13 files changed, 71 insertions(+), 74 deletions(-)

diffs (truncated from 628 to 300 lines):

diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/dir.c
--- a/sbin/fsck_ffs/dir.c       Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/dir.c       Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.61 2019/05/05 14:59:06 christos Exp $        */
+/*     $NetBSD: dir.c,v 1.62 2023/07/04 20:40:53 riastradh Exp $       */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dir.c      8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: dir.c,v 1.61 2019/05/05 14:59:06 christos Exp $");
+__RCSID("$NetBSD: dir.c,v 1.62 2023/07/04 20:40:53 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -230,7 +230,7 @@ dirscan(struct inodesc *idesc)
                        dirty(bp);
                        sbdirty();
                }
-               if (n & STOP) 
+               if (n & STOP)
                        return (n);
        }
        return (idesc->id_filesize > 0 ? KEEPON : STOP);
@@ -265,7 +265,7 @@ fsck_readdir(struct inodesc *idesc)
                dp->d_name[0] = '\0';
                if (fix)
                        dirty(bp);
-               else 
+               else
                        markclean = 0;
                idesc->id_loc += dirblksiz;
                idesc->id_filesize -= dirblksiz;
@@ -294,7 +294,7 @@ dpok:
                dp->d_reclen = iswap16(iswap16(dp->d_reclen) + size);
                if (fix)
                        dirty(bp);
-               else 
+               else
                        markclean = 0;
        }
        return (dp);
@@ -308,7 +308,7 @@ dpok:
  *     0: bad
  */
 static int
-dircheck(struct inodesc *idesc, struct direct *dp, struct bufarea *bp) 
+dircheck(struct inodesc *idesc, struct direct *dp, struct bufarea *bp)
 {
        uint8_t namlen, type;
        uint16_t reclen;
@@ -497,7 +497,7 @@ adjust(struct inodesc *idesc, int lcnt)
                if (preen || reply("ADJUST") == 1) {
                        DIP_SET(dp, nlink, iswap16(nlink - lcnt));
                        inodirty();
-               } else 
+               } else
                        markclean = 0;
        }
 }
@@ -715,7 +715,7 @@ makeentry(ino_t parent, ino_t ino, const
        union dinode *dp;
        struct inodesc idesc;
        char pathbuf[MAXPATHLEN + 1];
-       
+
        if (parent < UFS_ROOTINO || parent >= maxino ||
            ino < UFS_ROOTINO || ino >= maxino)
                return (0);
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/extern.h
--- a/sbin/fsck_ffs/extern.h    Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/extern.h    Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.28 2022/11/17 06:40:38 chs Exp $  */
+/*     $NetBSD: extern.h,v 1.29 2023/07/04 20:40:53 riastradh Exp $    */
 
 /*
  * Copyright (c) 1994 James A. Jegers
@@ -88,7 +88,6 @@ void          remove_uquot(struct uquot_hash *,s
 void           update_uquot(ino_t, uid_t, gid_t, int64_t, int64_t);
 int            is_quota_inode(ino_t);
 
-
 int            check_wapbl(void);
 void           replay_wapbl(void);
 void           cleanup_wapbl(void);
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/fsck.h
--- a/sbin/fsck_ffs/fsck.h      Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/fsck.h      Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fsck.h,v 1.57 2023/01/14 12:12:50 christos Exp $       */
+/*     $NetBSD: fsck.h,v 1.58 2023/07/04 20:40:53 riastradh Exp $      */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -101,7 +101,6 @@ extern struct inostatlist {
        struct inostat *il_stat;/* inostat info for this cylinder group */
 } *inostathead;
 
-
 /*
  * buffer cache structure.
  */
@@ -205,14 +204,14 @@ struct inodesc {
 
 /*
  * Linked list of duplicate blocks.
- * 
+ *
  * The list is composed of two parts. The first part of the
  * list (from duplist through the node pointed to by muldup)
- * contains a single copy of each duplicate block that has been 
+ * contains a single copy of each duplicate block that has been
  * found. The second part of the list (from muldup to the end)
  * contains duplicate blocks that have been found more than once.
  * To check if a block has been found as a duplicate it is only
- * necessary to search from duplist through muldup. To find the 
+ * necessary to search from duplist through muldup. To find the
  * total number of times that a block has been found as a duplicate
  * the entire list must be searched for occurrences of the block
  * in question. The following diagram shows a sample list where
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/inode.c
--- a/sbin/fsck_ffs/inode.c     Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/inode.c     Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inode.c,v 1.76 2023/07/04 20:40:22 riastradh Exp $     */
+/*     $NetBSD: inode.c,v 1.77 2023/07/04 20:40:53 riastradh Exp $     */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c    8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.76 2023/07/04 20:40:22 riastradh Exp $");
+__RCSID("$NetBSD: inode.c,v 1.77 2023/07/04 20:40:53 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -251,7 +251,7 @@ iblock(struct inodesc *idesc, long ileve
                                    pathbuf);
                                if (reply("ADJUST LENGTH") == 1) {
                                        dp = ginode(idesc->id_number);
-                                       DIP_SET(dp, size, 
+                                       DIP_SET(dp, size,
                                            iswap64(iswap64(DIP(dp, size))
                                                - isize));
                                        isize = 0;
@@ -565,11 +565,11 @@ inocleanup(void)
        free((char *)inpsort);
        inphead = inpsort = NULL;
 }
-       
+
 void
 inodirty(void)
 {
-       
+
        dirty(pbp);
 }
 
@@ -910,7 +910,7 @@ readblk(union dinode *dp, off_t offset, 
                else
                        blkno -= nblks;
        }
-       if (ilevel > UFS_NIADDR) 
+       if (ilevel > UFS_NIADDR)
                errexit("bad ofsset %" PRIu64 " to readblk", offset);
 
        /* get the first indirect block */
@@ -990,7 +990,7 @@ expandfile(union dinode *dp)
                else
                        blkno -= nblks;
        }
-       if (ilevel > UFS_NIADDR) 
+       if (ilevel > UFS_NIADDR)
                errexit("bad filesize %" PRIu64 " to expandfile", filesize);
 
        /* get the first indirect block, allocating if needed */
@@ -1038,7 +1038,7 @@ expandfile(union dinode *dp)
                errexit("INTERNAL ERROR: "
                    "expandfile() failed to allocate a new block\n");
        }
-       
+
 out:
        filesize += sblock->fs_bsize;
        if (is_ufs2) {
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/main.c
--- a/sbin/fsck_ffs/main.c      Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/main.c      Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.91 2023/01/07 19:41:29 chs Exp $    */
+/*     $NetBSD: main.c,v 1.92 2023/07/04 20:40:53 riastradh Exp $      */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/14/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.91 2023/01/07 19:41:29 chs Exp $");
+__RCSID("$NetBSD: main.c,v 1.92 2023/07/04 20:40:53 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -284,7 +284,6 @@ main(int argc, char *argv[])
                        snap_internal = 0;
                }
        }
-                       
 
        argc -= optind;
        argv += optind;
@@ -318,7 +317,7 @@ main(int argc, char *argv[])
 
                if (path == NULL)
                        pfatal("Can't check %s\n", *argv);
-               
+
                if (snap_backup || snap_internal) {
                        char *snap_dev;
                        int snapfd;
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/pass1.c
--- a/sbin/fsck_ffs/pass1.c     Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/pass1.c     Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pass1.c,v 1.63 2023/01/07 19:41:29 chs Exp $   */
+/*     $NetBSD: pass1.c,v 1.64 2023/07/04 20:40:53 riastradh Exp $     */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass1.c    8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass1.c,v 1.63 2023/01/07 19:41:29 chs Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.64 2023/07/04 20:40:53 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -243,13 +243,13 @@ checkinode(ino_t inumber, struct inodesc
        mode = iswap16(DIP(dp, mode)) & IFMT;
        size = iswap64(DIP(dp, size));
        if (mode == 0) {
-               if ((is_ufs2 && 
+               if ((is_ufs2 &&
                    (memcmp(dp->dp2.di_db, ufs2_zino.di_db,
                        UFS_NDADDR * sizeof(int64_t)) ||
                    memcmp(dp->dp2.di_ib, ufs2_zino.di_ib,
                        UFS_NIADDR * sizeof(int64_t))))
                    ||
-                   (!is_ufs2 && 
+                   (!is_ufs2 &&
                    (memcmp(dp->dp1.di_db, ufs1_zino.di_db,
                        UFS_NDADDR * sizeof(int32_t)) ||
                    memcmp(dp->dp1.di_ib, ufs1_zino.di_ib,
@@ -333,7 +333,7 @@ checkinode(ino_t inumber, struct inodesc
                    (sblock->fs_maxsymlinklen == 0 && DIP(dp, blocks) == 0)) {
                        if (is_ufs2)
                                ndb = howmany(size, sizeof(int64_t));
-                       else    
+                       else
                                ndb = howmany(size, sizeof(int32_t));
                        if (ndb > UFS_NDADDR) {
                                j = ndb - UFS_NDADDR;
diff -r e73117891537 -r 3b5c15df676a sbin/fsck_ffs/pass2.c
--- a/sbin/fsck_ffs/pass2.c     Tue Jul 04 20:40:43 2023 +0000
+++ b/sbin/fsck_ffs/pass2.c     Tue Jul 04 20:40:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pass2.c,v 1.52 2023/03/27 22:53:37 chs Exp $   */
+/*     $NetBSD: pass2.c,v 1.53 2023/07/04 20:40:53 riastradh Exp $     */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass2.c    8.9 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass2.c,v 1.52 2023/03/27 22:53:37 chs Exp $");
+__RCSID("$NetBSD: pass2.c,v 1.53 2023/07/04 20:40:53 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -150,7 +150,7 @@ pass2(void)
                if (got_siginfo) {
                        fprintf(stderr,
                            "%s: phase 2: dir %ld of %d (%d%%)\n", cdevname(),
-                           (long)(inpp - inpsort), (int)inplast, 
+                           (long)(inpp - inpsort), (int)inplast,
                            (int)((inpp - inpsort) * 100 / inplast));
                        got_siginfo = 0;
                }
@@ -230,7 +230,7 @@ pass2(void)
         * Byte swapping in directory entries, if needed, has been done.
         * Now rescan dirs for pass2check()



Home | Main Index | Thread Index | Old Index