From owner-svn-src-head@FreeBSD.ORG Wed Apr 27 02:55:03 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82AD0106564A; Wed, 27 Apr 2011 02:55:03 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6977A8FC16; Wed, 27 Apr 2011 02:55:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3R2t3tE050520; Wed, 27 Apr 2011 02:55:03 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R2t3Pt050514; Wed, 27 Apr 2011 02:55:03 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201104270255.p3R2t3Pt050514@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 27 Apr 2011 02:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221110 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 02:55:03 -0000 Author: des Date: Wed Apr 27 02:55:03 2011 New Revision: 221110 URL: http://svn.freebsd.org/changeset/base/221110 Log: Mechanical whitespace cleanup. MFC after: 3 weeks Modified: head/sbin/fsck_ffs/ea.c head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/main.c head/sbin/fsck_ffs/pass2.c head/sbin/fsck_ffs/suj.c head/sbin/fsck_ffs/utilities.c Modified: head/sbin/fsck_ffs/ea.c ============================================================================== --- head/sbin/fsck_ffs/ea.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/ea.c Wed Apr 27 02:55:03 2011 (r221110) @@ -83,4 +83,3 @@ eascan(struct inodesc *idesc, struct ufs return (STOP); #endif } - Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/inode.c Wed Apr 27 02:55:03 2011 (r221110) @@ -91,18 +91,18 @@ ckinode(union dinode *dp, struct inodesc /* 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 /* 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 ileve /* 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; Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/main.c Wed Apr 27 02:55:03 2011 (r221110) @@ -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); } Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/pass2.c Wed Apr 27 02:55:03 2011 (r221110) @@ -524,7 +524,7 @@ fix_extraneous(struct inoinfo *inp, stru 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. Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/suj.c Wed Apr 27 02:55:03 2011 (r221110) @@ -522,7 +522,7 @@ blk_setmask(struct jblkrec *brec, int *m * 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 * 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 * 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 i 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 @@ restart: 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", Modified: head/sbin/fsck_ffs/utilities.c ============================================================================== --- head/sbin/fsck_ffs/utilities.c Wed Apr 27 02:41:26 2011 (r221109) +++ head/sbin/fsck_ffs/utilities.c Wed Apr 27 02:55:03 2011 (r221110) @@ -86,7 +86,7 @@ retry: case S_IFDIR: if (retried) break; - + len = strlen(origname) - 1; if (len > 0 && origname[len] == '/') /* remove trailing slash */