[Midnightbsd-cvs] src [10475] trunk/sbin/tunefs/tunefs.c: use static void

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jun 6 20:28:02 EDT 2018


Revision: 10475
          http://svnweb.midnightbsd.org/src/?rev=10475
Author:   laffer1
Date:     2018-06-06 20:28:01 -0400 (Wed, 06 Jun 2018)
Log Message:
-----------
use static void

Modified Paths:
--------------
    trunk/sbin/tunefs/tunefs.c

Modified: trunk/sbin/tunefs/tunefs.c
===================================================================
--- trunk/sbin/tunefs/tunefs.c	2018-06-07 00:27:02 UTC (rev 10474)
+++ trunk/sbin/tunefs/tunefs.c	2018-06-07 00:28:01 UTC (rev 10475)
@@ -70,14 +70,16 @@
 /* the optimization warning string template */
 #define	OPTWARN	"should optimize for %s with minfree %s %d%%"
 
-struct uufsd disk;
+static int blocks;
+static char clrbuf[MAXBSIZE];
+static struct uufsd disk;
 #define	sblock disk.d_fs
 
-void usage(void);
-void printfs(void);
-int journal_alloc(int64_t size);
-void journal_clear(void);
-void sbdirty(void);
+static void usage(void);
+static void printfs(void);
+static int journal_alloc(int64_t size);
+static void journal_clear(void);
+static void sbdirty(void);
 
 int
 main(int argc, char *argv[])
@@ -568,7 +570,7 @@
 		err(12, "%s", special);
 }
 
-void
+static void
 sbdirty(void)
 {
 	disk.d_fs.fs_flags |= FS_UNCLEAN | FS_NEEDSFSCK;
@@ -575,9 +577,6 @@
 	disk.d_fs.fs_clean = 0;
 }
 
-int blocks;
-static char clrbuf[MAXBSIZE];
-
 static ufs2_daddr_t
 journal_balloc(void)
 {
@@ -903,7 +902,7 @@
 /*
  * Clear the flag bits so the journal can be removed.
  */
-void
+static void
 journal_clear(void)
 {
 	struct ufs1_dinode *dp1;
@@ -917,7 +916,7 @@
 		warnx("Journal file does not exist");
 		return;
 	}
-	printf("Clearing journal flags from inode %d\n", ino);
+	printf("Clearing journal flags from inode %ju\n", (uintmax_t)ino);
 	if (getino(&disk, &ip, ino, &mode) != 0) {
 		warn("Failed to get journal inode");
 		return;
@@ -934,7 +933,7 @@
 	}
 }
 
-int
+static int
 journal_alloc(int64_t size)
 {
 	struct ufs1_dinode *dp1;
@@ -993,8 +992,8 @@
 		ino = cgialloc(&disk);
 		if (ino <= 0)
 			break;
-		printf("Using inode %d in cg %d for %jd byte journal\n", 
-		    ino, cgp->cg_cgx, size);
+		printf("Using inode %ju in cg %d for %jd byte journal\n",
+		    (uintmax_t)ino, cgp->cg_cgx, size);
 		if (getino(&disk, &ip, ino, &mode) != 0) {
 			warn("Failed to get allocated inode");
 			sbdirty();
@@ -1083,7 +1082,7 @@
 	return (-1);
 }
 
-void
+static void
 usage(void)
 {
 	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
@@ -1096,7 +1095,7 @@
 	exit(2);
 }
 
-void
+static void
 printfs(void)
 {
 	warnx("POSIX.1e ACLs: (-a)                                %s",



More information about the Midnightbsd-cvs mailing list