summaryrefslogtreecommitdiffstats
path: root/sbin/newfs
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-04 13:36:02 +0000
committered <ed@FreeBSD.org>2011-11-04 13:36:02 +0000
commit5b02333e84f8998d65b39ad509f9c9c5b9df1186 (patch)
tree3cdfecf4c6772b1de7694dadb6b4b6431ecfdb02 /sbin/newfs
parent89ec155d247591875dd57c531f710aa8a05cdb16 (diff)
downloadFreeBSD-src-5b02333e84f8998d65b39ad509f9c9c5b9df1186.zip
FreeBSD-src-5b02333e84f8998d65b39ad509f9c9c5b9df1186.tar.gz
Add missing static keywords for global variables to tools in sbin/.
These tools declare global variables without using the static keyword, even though their use is limited to a single C-file, or without placing an extern declaration of them in the proper header file.
Diffstat (limited to 'sbin/newfs')
-rw-r--r--sbin/newfs/mkfs.c4
-rw-r--r--sbin/newfs/newfs.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 0503ebf..c40026a 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -804,7 +804,7 @@ initcg(int cylno, time_t utime)
*/
#define ROOTLINKCNT 3
-struct direct root_dir[] = {
+static struct direct root_dir[] = {
{ ROOTINO, sizeof(struct direct), DT_DIR, 1, "." },
{ ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
{ ROOTINO + 1, sizeof(struct direct), DT_DIR, 5, ".snap" },
@@ -812,7 +812,7 @@ struct direct root_dir[] = {
#define SNAPLINKCNT 2
-struct direct snap_dir[] = {
+static struct direct snap_dir[] = {
{ ROOTINO + 1, sizeof(struct direct), DT_DIR, 1, "." },
{ ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
};
diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h
index 326c518..d25baa7 100644
--- a/sbin/newfs/newfs.h
+++ b/sbin/newfs/newfs.h
@@ -81,6 +81,7 @@ extern int Nflag; /* run mkfs without writing file system */
extern int Oflag; /* build UFS1 format file system */
extern int Rflag; /* regression test */
extern int Uflag; /* enable soft updates for file system */
+extern int jflag; /* enable soft updates journaling for filesys */
extern int Xflag; /* exit in middle of newfs for testing */
extern int Jflag; /* enable gjournal for file system */
extern int lflag; /* enable multilabel MAC for file system */
OpenPOWER on IntegriCloud