From owner-svn-src-all@FreeBSD.ORG Fri Sep 28 17:34:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92770106566B; Fri, 28 Sep 2012 17:34:35 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE338FC12; Fri, 28 Sep 2012 17:34:35 +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 q8SHYZ1H079740; Fri, 28 Sep 2012 17:34:35 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8SHYZmv079736; Fri, 28 Sep 2012 17:34:35 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201209281734.q8SHYZmv079736@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 28 Sep 2012 17:34:35 +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: r241035 - head/sbin/fsck_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2012 17:34:35 -0000 Author: mdf Date: Fri Sep 28 17:34:34 2012 New Revision: 241035 URL: http://svn.freebsd.org/changeset/base/241035 Log: Fix some nearby type and style errors. Pointed out by: bde Modified: head/sbin/fsck_ffs/main.c head/sbin/fsck_ffs/pass1.c head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Fri Sep 28 16:23:01 2012 (r241034) +++ head/sbin/fsck_ffs/main.c Fri Sep 28 17:34:34 2012 (r241035) @@ -210,12 +210,11 @@ checkfilesys(char *filesys) struct statfs *mntp; struct stat snapdir; struct group *grp; - ufs2_daddr_t blks; struct iovec *iov; char errmsg[255]; int iovlen; int cylno; - ino_t files; + intmax_t blks, files; size_t size; iov = NULL; @@ -382,9 +381,9 @@ checkfilesys(char *filesys) clean: pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree + sblock.fs_frag * sblock.fs_cstotal.cs_nbfree)); - printf("(%lld frags, %lld blocks, %.1f%% fragmentation)\n", - (long long)sblock.fs_cstotal.cs_nffree, - (long long)sblock.fs_cstotal.cs_nbfree, + printf("(%jd frags, %jd blocks, %.1f%% fragmentation)\n", + (intmax_t)sblock.fs_cstotal.cs_nffree, + (intmax_t)sblock.fs_cstotal.cs_nbfree, sblock.fs_cstotal.cs_nffree * 100.0 / sblock.fs_dsize); return (0); } @@ -481,8 +480,8 @@ checkfilesys(char *filesys) blks = maxfsblock - (n_ffree + sblock.fs_frag * n_bfree) - blks; if (bkgrdflag && (files > 0 || blks > 0)) { countdirs = sblock.fs_cstotal.cs_ndir - countdirs; - pwarn("Reclaimed: %ld directories, %ld files, %lld fragments\n", - countdirs, (long)files - countdirs, (long long)blks); + pwarn("Reclaimed: %ld directories, %jd files, %jd fragments\n", + countdirs, files - countdirs, blks); } pwarn("%ld files, %jd used, %ju free ", (long)n_files, (intmax_t)n_blks, @@ -492,13 +491,13 @@ checkfilesys(char *filesys) n_ffree * 100.0 / sblock.fs_dsize); if (debug) { if (files < 0) - printf("%jd inodes missing\n", (intmax_t)-files); + printf("%jd inodes missing\n", -files); if (blks < 0) - printf("%lld blocks missing\n", -(long long)blks); + printf("%jd blocks missing\n", -blks); if (duplist != NULL) { printf("The following duplicate blocks remain:"); for (dp = duplist; dp; dp = dp->next) - printf(" %lld,", (long long)dp->dup); + printf(" %jd,", (intmax_t)dp->dup); printf("\n"); } } Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Fri Sep 28 16:23:01 2012 (r241034) +++ head/sbin/fsck_ffs/pass1.c Fri Sep 28 17:34:34 2012 (r241035) @@ -99,11 +99,10 @@ pass1(void) if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgrp.cg_initediblk; if (inosused > sblock.fs_ipg) { - pfatal("%s (%ju > %d) %s %d\nReset to %d\n", - "Too many initialized inodes", + pfatal( +"Too many initialized inodes (%ju > %d) in cylinder group %d\nReset to %d\n", (uintmax_t)inosused, - sblock.fs_ipg, "in cylinder group", c, - sblock.fs_ipg); + sblock.fs_ipg, c, sblock.fs_ipg); inosused = sblock.fs_ipg; } } else { Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Fri Sep 28 16:23:01 2012 (r241034) +++ head/sbin/fsck_ffs/suj.c Fri Sep 28 17:34:34 2012 (r241035) @@ -1401,9 +1401,8 @@ ino_adjust(struct suj_ino *sino) ip = ino_read(ino); mode = DIP(ip, di_mode) & IFMT; if (nlink > LINK_MAX) - err_suj("ino %ju %s, new link %d, old link %d\n", - (uintmax_t)ino, "nlink manipulation error", nlink, - DIP(ip, di_nlink)); + err_suj("ino %ju nlink manipulation error, new %d, old %d\n", + (uintmax_t)ino, nlink, DIP(ip, di_nlink)); if (debug) printf("Adjusting ino %ju, nlink %d, old link %d lastmode %o\n", (uintmax_t)ino, nlink, DIP(ip, di_nlink), sino->si_mode);