From d40c066473b4c97ff1fffe98063a7cdb53e6b050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 27 Apr 2011 02:55:03 +0000 Subject: [PATCH] Mechanical whitespace cleanup. MFC after: 3 weeks --- sbin/fsck_ffs/ea.c | 1 - sbin/fsck_ffs/inode.c | 32 ++++++++++++++++---------------- sbin/fsck_ffs/main.c | 14 +++++++------- sbin/fsck_ffs/pass2.c | 2 +- sbin/fsck_ffs/suj.c | 20 ++++++++++---------- sbin/fsck_ffs/utilities.c | 2 +- 6 files changed, 35 insertions(+), 36 deletions(-) diff --git a/sbin/fsck_ffs/ea.c b/sbin/fsck_ffs/ea.c index 2cdf71e3ebeb..c1cf59dd667a 100644 --- a/sbin/fsck_ffs/ea.c +++ b/sbin/fsck_ffs/ea.c @@ -83,4 +83,3 @@ eascan(struct inodesc *idesc, struct ufs2_dinode *dp) return (STOP); #endif } - diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index fa738ed02fbe..4ef70fce3d55 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -91,18 +91,18 @@ ckinode(union dinode *dp, struct inodesc *idesc) /* An empty block in a directory XXX */ getpathname(pathbuf, idesc->id_number, idesc->id_number); - pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", + pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", pathbuf); - if (reply("ADJUST LENGTH") == 1) { + if (reply("ADJUST LENGTH") == 1) { dp = ginode(idesc->id_number); - DIP_SET(dp, di_size, + DIP_SET(dp, di_size, i * sblock.fs_bsize); printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); - - } + inodirty(); + + } } continue; } @@ -130,19 +130,19 @@ ckinode(union dinode *dp, struct inodesc *idesc) /* An empty block in a directory XXX */ getpathname(pathbuf, idesc->id_number, idesc->id_number); - pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", + pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", pathbuf); - if (reply("ADJUST LENGTH") == 1) { + if (reply("ADJUST LENGTH") == 1) { dp = ginode(idesc->id_number); - DIP_SET(dp, di_size, + DIP_SET(dp, di_size, DIP(dp, di_size) - remsize); remsize = 0; printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); + inodirty(); break; - } + } } } remsize -= sizepb; @@ -209,20 +209,20 @@ iblock(struct inodesc *idesc, long ilevel, off_t isize) /* An empty block in a directory XXX */ getpathname(pathbuf, idesc->id_number, idesc->id_number); - pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", + pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS", pathbuf); - if (reply("ADJUST LENGTH") == 1) { + if (reply("ADJUST LENGTH") == 1) { dp = ginode(idesc->id_number); - DIP_SET(dp, di_size, + DIP_SET(dp, di_size, DIP(dp, di_size) - isize); isize = 0; printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); + inodirty(); bp->b_flags &= ~B_INUSE; return(STOP); - } + } } } isize -= sizepb; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 8ee140d53bf4..127a612cae91 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -407,7 +407,7 @@ checkfilesys(char *filesys) sblock.fs_mtime = time(NULL); sbdirty(); } - + /* * Cleared if any questions answered no. Used to decide if * the superblock should be marked clean. @@ -576,7 +576,7 @@ chkdoreload(struct statfs *mntp) /* * XX: We need the following line until we clean up * nmount parsing of root mounts and NFS root mounts. - */ + */ build_iovec(&iov, &iovlen, "ro", NULL, 0); if (nmount(iov, iovlen, mntp->f_flags) == 0) { return (0); @@ -631,9 +631,9 @@ getmntpt(const char *name) static void usage(void) { - (void) fprintf(stderr, - "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] " - "filesystem ...\n", - getprogname()); - exit(1); + (void) fprintf(stderr, + "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] " + "filesystem ...\n", + getprogname()); + exit(1); } diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 0fce90e1dabe..5959778e0546 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -524,7 +524,7 @@ fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) struct inodesc dotdesc; char oldname[MAXPATHLEN + 1]; char newname[MAXPATHLEN + 1]; - + /* * If we have not yet found "..", look it up now so we know * which inode the directory itself believes is its parent. diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index 7dda78efedc6..c1c581142154 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -522,7 +522,7 @@ blk_setmask(struct jblkrec *brec, int *mask) * Determine whether a given block has been reallocated to a new location. * Returns a mask of overlapping bits if any frags have been reused or * zero if the block has not been re-used and the contents can be trusted. - * + * * This is used to ensure that an orphaned pointer due to truncate is safe * to be freed. The mask value can be used to free partial blocks. */ @@ -554,7 +554,7 @@ blk_freemask(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags) * exactly it's a new allocation. If it matches * exactly this record refers to the current * location. - */ + */ if (blk_overlaps(brec, blk, frags) == 0) continue; if (blk_equals(brec, ino, lbn, blk, frags) == 1) @@ -576,7 +576,7 @@ blk_freemask(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags) * It is also not safe to follow an indirect if the cg bitmap has been * cleared as a new allocation may write to the block prior to the journal * being written. - * + * * Returns 1 if it's safe to follow the indirect and 0 otherwise. */ static int @@ -718,7 +718,7 @@ indir_blkatoff(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t cur, ufs_lbn_t lbn) base = -(cur + level); for (i = level; i > 0; i--) lbnadd *= NINDIR(fs); - if (lbn > 0) + if (lbn > 0) i = (lbn - base) / lbnadd; else i = (-lbn - base) / lbnadd; @@ -1572,7 +1572,7 @@ ino_trunc(ino_t ino, off_t size) * last populated lbn is. We will set the size to this last lbn * rather than worrying about allocating the final lbn as the kernel * would've done. This is consistent with normal fsck behavior. - */ + */ visitlbn = 0; totalfrags = ino_visit(ip, ino, null_visit, VISIT_INDIR | VISIT_EXT); if (size > lblktosize(fs, visitlbn + 1)) @@ -1650,7 +1650,7 @@ ino_check(struct suj_ino *sino) removes = sino->si_nlinkadj; TAILQ_FOREACH(srec, &sino->si_recs, sr_next) { rrec = (struct jrefrec *)srec->sr_rec; - isat = ino_isat(rrec->jr_parent, rrec->jr_diroff, + isat = ino_isat(rrec->jr_parent, rrec->jr_diroff, rrec->jr_ino, &mode, &isdot); if (isat && (mode & IFMT) != (rrec->jr_mode & IFMT)) err_suj("Inode mode/directory type mismatch %o != %o\n", @@ -1952,13 +1952,13 @@ ino_append(union jrec *rec) mvrec = &rec->rec_jmvrec; refrec = &rec->rec_jrefrec; if (debug && mvrec->jm_op == JOP_MVREF) - printf("ino move: ino %d, parent %d, diroff %jd, oldoff %jd\n", + printf("ino move: ino %d, parent %d, diroff %jd, oldoff %jd\n", mvrec->jm_ino, mvrec->jm_parent, mvrec->jm_newoff, mvrec->jm_oldoff); else if (debug && (refrec->jr_op == JOP_ADDREF || refrec->jr_op == JOP_REMREF)) printf("ino ref: op %d, ino %d, nlink %d, " - "parent %d, diroff %jd\n", + "parent %d, diroff %jd\n", refrec->jr_op, refrec->jr_ino, refrec->jr_nlink, refrec->jr_parent, refrec->jr_diroff); /* @@ -2330,7 +2330,7 @@ suj_prune(void) TAILQ_REMOVE(&allsegs, seg, ss_next); TAILQ_INSERT_HEAD(&allsegs, seg, ss_next); newseq = seg->ss_rec.jsr_seq; - + } if (newseq != oldseq) { err_suj("Journal file sequence mismatch %jd != %jd\n", @@ -2609,7 +2609,7 @@ suj_read(void) recn = (void *)((uintptr_t)rec) + i * real_dev_bsize; if (recn->jsr_seq == rec->jsr_seq && - recn->jsr_time == rec->jsr_time) + recn->jsr_time == rec->jsr_time) continue; if (debug) printf("Incomplete record %jd (%d)\n", diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index 8e6682034214..5e7d69c1ff6a 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -86,7 +86,7 @@ blockcheck(char *origname) case S_IFDIR: if (retried) break; - + len = strlen(origname) - 1; if (len > 0 && origname[len] == '/') /* remove trailing slash */