diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-07-04 20:40:53 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-07-04 20:40:53 +0000 |
| commit | aa5cfbe70831bc5c1627c228bb49e4eda376e847 (patch) | |
| tree | b148310bad56983dd049d70bef16a53062b2ca98 | |
| parent | 8617756d0d343d42f3ec0b53fab845b3fbb66c66 (diff) | |
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.
| -rw-r--r-- | sbin/fsck_ffs/dir.c | 16 | ||||
| -rw-r--r-- | sbin/fsck_ffs/extern.h | 3 | ||||
| -rw-r--r-- | sbin/fsck_ffs/fsck.h | 9 | ||||
| -rw-r--r-- | sbin/fsck_ffs/inode.c | 16 | ||||
| -rw-r--r-- | sbin/fsck_ffs/main.c | 7 | ||||
| -rw-r--r-- | sbin/fsck_ffs/pass1.c | 10 | ||||
| -rw-r--r-- | sbin/fsck_ffs/pass2.c | 10 | ||||
| -rw-r--r-- | sbin/fsck_ffs/pass4.c | 6 | ||||
| -rw-r--r-- | sbin/fsck_ffs/pass5.c | 6 | ||||
| -rw-r--r-- | sbin/fsck_ffs/pass6.c | 6 | ||||
| -rw-r--r-- | sbin/fsck_ffs/quota2.c | 19 | ||||
| -rw-r--r-- | sbin/fsck_ffs/setup.c | 21 | ||||
| -rw-r--r-- | sbin/fsck_ffs/utilities.c | 16 |
13 files changed, 71 insertions, 74 deletions
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index 8edcc67344f..242bbfba7c0 100644 --- a/sbin/fsck_ffs/dir.c +++ b/sbin/fsck_ffs/dir.c @@ -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 char *name) union dinode *dp; struct inodesc idesc; char pathbuf[MAXPATHLEN + 1]; - + if (parent < UFS_ROOTINO || parent >= maxino || ino < UFS_ROOTINO || ino >= maxino) return (0); diff --git a/sbin/fsck_ffs/extern.h b/sbin/fsck_ffs/extern.h index 49fd8824b84..74ae33d3990 100644 --- a/sbin/fsck_ffs/extern.h +++ b/sbin/fsck_ffs/extern.h @@ -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 *,struct uquot *); 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 --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 3552383bfcf..2de73cf2964 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -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 --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 540d8a4ca2b..71e91ab95ee 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -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 ilevel, u_int64_t isize) 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, struct bufarea **bp) 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 --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index def7915f025..99c3f3ec621 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\ #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 --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 54799d6241d..1464ff72b31 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -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 *idesc) 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 *idesc) (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 --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 54dbeb4a7a0..eac0259753d 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -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() */ - if (do_dirswap) { + if (do_dirswap) { do_dirswap = 0; for (inpp = inpsort; inpp < inpend; inpp++) { inp = *inpp; @@ -341,7 +341,7 @@ pass2check(struct inodesc *idesc) dirp->d_type = inoinfo(iswap32(dirp->d_ino))->ino_type; ret |= ALTERED; } - /* + /* * check for "." */ if (idesc->id_entryno != 0) diff --git a/sbin/fsck_ffs/pass4.c b/sbin/fsck_ffs/pass4.c index f5f9856daae..86fc44af694 100644 --- a/sbin/fsck_ffs/pass4.c +++ b/sbin/fsck_ffs/pass4.c @@ -1,4 +1,4 @@ -/* $NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $ */ +/* $NetBSD: pass4.c,v 1.31 2023/07/04 20:40:53 riastradh Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass4.c 8.4 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $"); +__RCSID("$NetBSD: pass4.c,v 1.31 2023/07/04 20:40:53 riastradh Exp $"); #endif #endif /* not lint */ @@ -196,7 +196,7 @@ pass4check(struct inodesc *idesc) n_blks--; if (idesc->id_type != SNAP) { update_uquot(idesc->id_number, - idesc->id_uid, idesc->id_gid, + idesc->id_uid, idesc->id_gid, -btodb(sblock->fs_fsize), 0); } if (idesc->id_numfrags != sblock->fs_frag && diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index e77356970ea..30939044a14 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -1,4 +1,4 @@ -/* $NetBSD: pass5.c,v 1.57 2023/01/08 05:25:24 chs Exp $ */ +/* $NetBSD: pass5.c,v 1.58 2023/07/04 20:40:53 riastradh Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass5.c 8.9 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: pass5.c,v 1.57 2023/01/08 05:25:24 chs Exp $"); +__RCSID("$NetBSD: pass5.c,v 1.58 2023/07/04 20:40:53 riastradh Exp $"); #endif #endif /* not lint */ @@ -507,7 +507,7 @@ pass5(void) #endif /* PROGRESS */ } -void +void print_bmap(u_char *map, uint32_t size) { uint32_t i, j; diff --git a/sbin/fsck_ffs/pass6.c b/sbin/fsck_ffs/pass6.c index bbb62e11e08..73106be50e8 100644 --- a/sbin/fsck_ffs/pass6.c +++ b/sbin/fsck_ffs/pass6.c @@ -1,4 +1,5 @@ -/* $NetBSD: pass6.c,v 1.4 2012/08/26 09:34:17 dholland Exp $ */ +/* $NetBSD: pass6.c,v 1.5 2023/07/04 20:40:53 riastradh Exp $ */ + /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -52,7 +53,7 @@ pass6(void) if ((sblock->fs_flags & FS_DOQUOTA2) == 0) return; - for (i = 0; i < MAXQUOTAS; i++) { + for (i = 0; i < MAXQUOTAS; i++) { if ((sblock->fs_quota_flags & FS_Q2_DO_TYPE(i)) == 0 && sblock->fs_quotafile[i] != 0) { if (preen || reply( @@ -87,4 +88,3 @@ pass6(void) if (ret2 == 0) quota2_check_usage(GRPQUOTA); } - diff --git a/sbin/fsck_ffs/quota2.c b/sbin/fsck_ffs/quota2.c index b25ba185477..60a524b1daf 100644 --- a/sbin/fsck_ffs/quota2.c +++ b/sbin/fsck_ffs/quota2.c @@ -1,4 +1,5 @@ -/* $NetBSD: quota2.c,v 1.7 2019/02/03 03:19:26 mrg Exp $ */ +/* $NetBSD: quota2.c,v 1.8 2023/07/04 20:40:53 riastradh Exp $ */ + /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -122,7 +123,7 @@ quota2_alloc_quota(union dinode * dp, struct bufarea *hbp, q2h->q2h_entries[uid & q2h_hash_mask] = iswap64(off); dirty(bp); dirty(hbp); - + if (bp != hbp) bp->b_flags &= ~B_INUSE; return 0; @@ -247,7 +248,7 @@ quota2_check_inode(int type) const int quota2_hash_size = 1 << q2h_hash_shift; const int quota2_full_header_size = sizeof(struct quota2_header) + sizeof(q2h->q2h_entries[0]) * quota2_hash_size; - + if ((sblock->fs_quota_flags & FS_Q2_DO_TYPE(type)) == 0) return 0; if (sblock->fs_quotafile[type] != 0) { @@ -361,7 +362,7 @@ alloc: for (j = 0; j < nq2e; j++) setbit(quotamap[i], j); } - + /* check that all entries are in the lists (and only once) */ i = -1; ret = quota2_walk_list(dp, hbp, &q2h->q2h_free, &i, quota2_list_check); @@ -417,7 +418,7 @@ struct qcheck_arg { const char *capstrtype; struct uquot_hash *uquot_hash; }; - + static int quota2_list_qcheck(uint64_t *, struct quota2_entry *, uint64_t, void *); static int @@ -437,8 +438,8 @@ quota2_list_qcheck(uint64_t *offp, struct quota2_entry *q2e, uint64_t off, uq = &uq_null; else remove_uquot(a->uquot_hash, uq); - - if (iswap64(q2e->q2e_val[QL_BLOCK].q2v_cur) == uq->uq_b && + + if (iswap64(q2e->q2e_val[QL_BLOCK].q2v_cur) == uq->uq_b && iswap64(q2e->q2e_val[QL_FILE].q2v_cur) == uq->uq_i) return 0; pwarn("%s QUOTA MISMATCH FOR ID %d: %" PRIu64 "/%" PRIu64 " SHOULD BE " @@ -461,7 +462,7 @@ quota2_check_usage(int type) { const char *strtype = (type == USRQUOTA) ? "user" : "group"; const char *capstrtype = (type == USRQUOTA) ? "USER" : "GROUP"; - + struct bufarea *hbp; union dinode *dp; struct quota2_header *q2h; @@ -488,7 +489,7 @@ quota2_check_usage(int type) if (ret) return ret; } - + for (i = 0; i < quota2_hash_size; i++) { struct uquot *uq; SLIST_FOREACH(uq, &a.uquot_hash[i], uq_entries) { diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 9b16ea55ce9..d071243ff42 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.107 2023/07/04 20:40:22 riastradh Exp $ */ +/* $NetBSD: setup.c,v 1.108 2023/07/04 20:40:53 riastradh Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95"; #else -__RCSID("$NetBSD: setup.c,v 1.107 2023/07/04 20:40:22 riastradh Exp $"); +__RCSID("$NetBSD: setup.c,v 1.108 2023/07/04 20:40:53 riastradh Exp $"); #endif #endif /* not lint */ @@ -182,7 +182,7 @@ setup(const char *dev, const char *origdev) if (!quota2_check_doquota()) doskipclean = 0; - + /* ffs_superblock_layout() == 2 */ if (sblock->fs_magic != FS_UFS1_MAGIC || (sblock->fs_old_flags & FS_FLAGS_UPDATED) != 0) { @@ -209,7 +209,7 @@ setup(const char *dev, const char *origdev) * so we don't bother to re-read the superblock from * the journal. * XXX, instead we could re-read the superblock and - * then not force doskipclean = 0 + * then not force doskipclean = 0 */ } } @@ -297,7 +297,7 @@ setup(const char *dev, const char *origdev) } } if (!is_ufs2 && sblock->fs_old_postblformat != FS_42POSTBLFMT && - (sblock->fs_old_interleave < 1 || + (sblock->fs_old_interleave < 1 || sblock->fs_old_interleave > sblock->fs_old_nsect)) { pwarn("IMPOSSIBLE INTERLEAVE=%d IN SUPERBLOCK", sblock->fs_old_interleave); @@ -310,7 +310,7 @@ setup(const char *dev, const char *origdev) } } if (!is_ufs2 && sblock->fs_old_postblformat != FS_42POSTBLFMT && - (sblock->fs_old_npsect < sblock->fs_old_nsect || + (sblock->fs_old_npsect < sblock->fs_old_nsect || sblock->fs_old_npsect > sblock->fs_old_nsect*2)) { pwarn("IMPOSSIBLE NPSECT=%d IN SUPERBLOCK", sblock->fs_old_npsect); @@ -465,7 +465,7 @@ setup(const char *dev, const char *origdev) roundup2(sblock->fs_cssize, DEV_BSIZE)); if (sblock->fs_csp == NULL) { pwarn("cannot alloc %u bytes for summary info\n", - sblock->fs_cssize); + sblock->fs_cssize); goto badsblabel; } memset(sblock->fs_csp, 0, sblock->fs_cssize); @@ -530,7 +530,7 @@ setup(const char *dev, const char *origdev) inpsort = calloc((unsigned)listmax, sizeof(*inpsort)); inphead = calloc((unsigned)numdirs, sizeof(*inphead)); if (inpsort == NULL || inphead == NULL) { - pwarn("cannot alloc %u bytes for inphead\n", + pwarn("cannot alloc %u bytes for inphead\n", (unsigned)(numdirs * sizeof(struct inoinfo *))); goto badsblabel; } @@ -549,7 +549,7 @@ setup(const char *dev, const char *origdev) usedsoftdep = 0; #ifndef NO_APPLE_UFS - if (!forceimage && dkw.dkw_parent[0]) + if (!forceimage && dkw.dkw_parent[0]) if (strcmp(dkw.dkw_ptype, DKW_PTYPE_APPLEUFS) == 0) isappleufs = 1; @@ -1067,7 +1067,6 @@ cmpsblks44(const struct fs *sb, struct fs *asb) return memcmp(sb, asb, sb->fs_sbsize); } - static void badsb(int listerr, const char *s) { @@ -1160,7 +1159,7 @@ check_snapinum(void) uint32_t *snapinum = &sblock->fs_snapinum[0]; res = 0; - + if (isappleufs) return 0; diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index 6f0086052a2..aac3d5f02e4 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -1,4 +1,4 @@ -/* $NetBSD: utilities.c,v 1.69 2023/07/04 20:40:22 riastradh Exp $ */ +/* $NetBSD: utilities.c,v 1.70 2023/07/04 20:40:53 riastradh Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; #else -__RCSID("$NetBSD: utilities.c,v 1.69 2023/07/04 20:40:22 riastradh Exp $"); +__RCSID("$NetBSD: utilities.c,v 1.70 2023/07/04 20:40:53 riastradh Exp $"); #endif #endif /* not lint */ @@ -671,7 +671,7 @@ sb_oldfscompat_read(struct fs *fs, struct fs **fssave) fs->fs_old_cstotal.cs_nifree; fs->fs_cstotal.cs_nffree = fs->fs_old_cstotal.cs_nffree; - + fs->fs_maxbsize = fs->fs_bsize; fs->fs_time = fs->fs_old_time; fs->fs_size = fs->fs_old_size; @@ -756,17 +756,17 @@ update_uquot(ino_t inum, uid_t uid, gid_t gid, int64_t bchange, int64_t ichange) return; if (is_quota_inode(inum)) return; - + if (uquot_user_hash == NULL) return; - + if (uq_u == NULL || uq_u->uq_uid != uid) uq_u = find_uquot(uquot_user_hash, uid, 1); uq_u->uq_b += bchange; uq_u->uq_i += ichange; if (uq_g == NULL || uq_g->uq_uid != gid) uq_g = find_uquot(uquot_group_hash, gid, 1); - uq_g->uq_b += bchange; + uq_g->uq_b += bchange; uq_g->uq_i += ichange; } @@ -779,11 +779,11 @@ is_quota_inode(ino_t inum) if (sblock->fs_quota_magic != Q2_HEAD_MAGIC) return 0; - + if (sblock->fs_quotafile[USRQUOTA] == inum) return 1; - if (sblock->fs_quotafile[GRPQUOTA] == inum) + if (sblock->fs_quotafile[GRPQUOTA] == inum) return 1; return 0; |
