aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/atm/atmconfig/atmconfig_device.c2
-rw-r--r--sbin/atm/atmconfig/diag.c2
-rw-r--r--sbin/atm/atmconfig/main.c2
-rw-r--r--sbin/badsect/badsect.c6
-rw-r--r--sbin/camcontrol/camcontrol.c8
-rw-r--r--sbin/ccdconfig/ccdconfig.c2
-rw-r--r--sbin/devfs/rule.c2
-rw-r--r--sbin/dmesg/dmesg.c6
-rw-r--r--sbin/dumpfs/dumpfs.c2
-rw-r--r--sbin/fdisk/fdisk.c2
-rw-r--r--sbin/ffsinfo/ffsinfo.c2
-rw-r--r--sbin/fsck/fsck.c2
-rw-r--r--sbin/fsck/preen.c4
-rw-r--r--sbin/fsck_msdosfs/dir.c2
-rw-r--r--sbin/fsirand/fsirand.c2
-rw-r--r--sbin/growfs/growfs.c2
-rw-r--r--sbin/init/init.c8
-rw-r--r--sbin/mount/mount.c2
-rw-r--r--sbin/mount/mount_fs.c2
-rw-r--r--sbin/mount_cd9660/mount_cd9660.c2
-rw-r--r--sbin/mount_nullfs/mount_nullfs.c2
-rw-r--r--sbin/mount_udf/mount_udf.c2
-rw-r--r--sbin/natd/natd.c4
-rw-r--r--sbin/newfs/mkfs.c4
-rw-r--r--sbin/newfs/newfs.h1
-rw-r--r--sbin/rcorder/rcorder.c6
-rw-r--r--sbin/recoverdisk/recoverdisk.c2
-rw-r--r--sbin/shutdown/shutdown.c2
-rw-r--r--sbin/swapon/swapon.c2
-rw-r--r--sbin/tunefs/tunefs.c4
-rw-r--r--sbin/umount/umount.c6
31 files changed, 48 insertions, 49 deletions
diff --git a/sbin/atm/atmconfig/atmconfig_device.c b/sbin/atm/atmconfig/atmconfig_device.c
index 082494df95a5..f2f08380dcdf 100644
--- a/sbin/atm/atmconfig/atmconfig_device.c
+++ b/sbin/atm/atmconfig/atmconfig_device.c
@@ -103,7 +103,7 @@ static struct atmhw_list atmhw_list;
/*
* Read ATM hardware table
*/
-const struct snmp_table atmhw_table = {
+static const struct snmp_table atmhw_table = {
OIDX_begemotAtmHWTable,
OIDX_begemotAtmIfTableLastChange, 2,
sizeof(struct atmhw),
diff --git a/sbin/atm/atmconfig/diag.c b/sbin/atm/atmconfig/diag.c
index 699d5ccf2f6b..021131834c0a 100644
--- a/sbin/atm/atmconfig/diag.c
+++ b/sbin/atm/atmconfig/diag.c
@@ -57,7 +57,7 @@ static void diag_phy_print(int, char *[]);
static void diag_phy_stats(int, char *[]);
static void diag_stats(int, char *[]);
-const struct cmdtab diag_phy_tab[] = {
+static const struct cmdtab diag_phy_tab[] = {
{ "show", NULL, diag_phy_show },
{ "set", NULL, diag_phy_set },
{ "stats", NULL, diag_phy_stats },
diff --git a/sbin/atm/atmconfig/main.c b/sbin/atm/atmconfig/main.c
index d2543f7d1f36..73e1facdad56 100644
--- a/sbin/atm/atmconfig/main.c
+++ b/sbin/atm/atmconfig/main.c
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
#include "private.h"
/* verbosity level */
-int verbose;
+static int verbose;
/* notitle option */
static int notitle;
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c
index 93891714c193..f180410b01d4 100644
--- a/sbin/badsect/badsect.c
+++ b/sbin/badsect/badsect.c
@@ -71,9 +71,9 @@ __FBSDID("$FreeBSD$");
#define sblock disk.d_fs
#define acg disk.d_cg
-struct uufsd disk;
-struct fs *fs = &sblock;
-int errs;
+static struct uufsd disk;
+static struct fs *fs = &sblock;
+static int errs;
int chkuse(daddr_t, int);
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index 9ec83f5f2bd6..7612f5c6c638 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -140,7 +140,7 @@ static const char smppc_opts[] = "a:A:d:lm:M:o:p:s:S:T:";
static const char smpphylist_opts[] = "lq";
#endif
-struct camcontrol_opts option_table[] = {
+static struct camcontrol_opts option_table[] = {
#ifndef MINIMALISTIC
{"tur", CAM_CMD_TUR, CAM_ARG_NONE, NULL},
{"inquiry", CAM_CMD_INQUIRY, CAM_ARG_NONE, "DSR"},
@@ -207,8 +207,8 @@ struct cam_devlist {
path_id_t path_id;
};
-cam_cmdmask cmdlist;
-cam_argmask arglist;
+static cam_cmdmask cmdlist;
+static cam_argmask arglist;
camcontrol_optret getoption(struct camcontrol_opts *table, char *arg,
uint32_t *cmdnum, cam_argmask *argnum,
@@ -4646,7 +4646,7 @@ bailout:
return (error);
}
-struct camcontrol_opts phy_ops[] = {
+static struct camcontrol_opts phy_ops[] = {
{"nop", SMP_PC_PHY_OP_NOP, CAM_ARG_NONE, NULL},
{"linkreset", SMP_PC_PHY_OP_LINK_RESET, CAM_ARG_NONE, NULL},
{"hardreset", SMP_PC_PHY_OP_HARD_RESET, CAM_ARG_NONE, NULL},
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index 5630c45aa8d6..6324150b0ff7 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -59,7 +59,7 @@ static int lineno = 0;
static int verbose = 0;
static const char *ccdconf = _PATH_CCDCONF;
-struct flagval {
+static struct flagval {
const char *fv_flag;
int fv_val;
} flagvaltab[] = {
diff --git a/sbin/devfs/rule.c b/sbin/devfs/rule.c
index 25a7d289ad0f..e4726d78a234 100644
--- a/sbin/devfs/rule.c
+++ b/sbin/devfs/rule.c
@@ -76,7 +76,7 @@ static struct intstr ist_type[] = {
{ NULL, -1 }
};
-devfs_rsnum in_rsnum;
+static devfs_rsnum in_rsnum;
int
rule_main(int ac, char **av)
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index f2e513f6106c..002732cc479c 100644
--- a/sbin/dmesg/dmesg.c
+++ b/sbin/dmesg/dmesg.c
@@ -60,11 +60,9 @@ __FBSDID("$FreeBSD$");
#include <vis.h>
#include <sys/syslog.h>
-char s_msgbufp[] = "_msgbufp";
-
-struct nlist nl[] = {
+static struct nlist nl[] = {
#define X_MSGBUF 0
- { s_msgbufp, 0, 0, 0, 0 },
+ { "_msgbufp", 0, 0, 0, 0 },
{ NULL, 0, 0, 0, 0 },
};
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index c54fa2bb4303..a21f2f251028 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -77,7 +77,7 @@ static const char rcsid[] =
#define afs disk.d_fs
#define acg disk.d_cg
-struct uufsd disk;
+static struct uufsd disk;
int dumpfs(const char *);
int dumpfsid(void);
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c
index e3591be88025..38b5498e2645 100644
--- a/sbin/fdisk/fdisk.c
+++ b/sbin/fdisk/fdisk.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-int iotest;
+static int iotest;
#define NO_DISK_SECTORS ((u_int32_t)-1)
#define NO_TRACK_CYLINDERS 1023
diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c
index 1570da5e5f90..881fc1e1e1d3 100644
--- a/sbin/ffsinfo/ffsinfo.c
+++ b/sbin/ffsinfo/ffsinfo.c
@@ -79,7 +79,7 @@ static const char rcsid[] =
int _dbg_lvl_ = (DL_INFO); /* DL_TRC */
#endif /* FS_DEBUG */
-struct uufsd disk;
+static struct uufsd disk;
#define sblock disk.d_fs
#define acg disk.d_cg
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index 5e27010c2be9..768e670d6672 100644
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
static enum { IN_LIST, NOT_IN_LIST } which = NOT_IN_LIST;
-TAILQ_HEAD(fstypelist, entry) opthead, selhead;
+static TAILQ_HEAD(fstypelist, entry) opthead, selhead;
struct entry {
char *type;
diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c
index 6204685833f4..787bed0e2713 100644
--- a/sbin/fsck/preen.c
+++ b/sbin/fsck/preen.c
@@ -62,7 +62,7 @@ struct partentry {
char *p_type; /* file system type */
};
-TAILQ_HEAD(part, partentry) badh;
+static TAILQ_HEAD(part, partentry) badh;
struct diskentry {
TAILQ_ENTRY(diskentry) d_entries;
@@ -71,7 +71,7 @@ struct diskentry {
int d_pid; /* 0 or pid of fsck proc */
};
-TAILQ_HEAD(disk, diskentry) diskh;
+static TAILQ_HEAD(disk, diskentry) diskh;
static int nrun = 0, ndisks = 0;
diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c
index f2ecff351638..1dc4456bc3f3 100644
--- a/sbin/fsck_msdosfs/dir.c
+++ b/sbin/fsck_msdosfs/dir.c
@@ -153,7 +153,7 @@ freeDirTodo(struct dirTodoNode *dt)
/*
* The stack of unread directories
*/
-struct dirTodoNode *pendingDirectories = NULL;
+static struct dirTodoNode *pendingDirectories = NULL;
/*
* Return the full pathname for a directory entry.
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index 483879e45d33..c3ae3e0763ad 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -60,7 +60,7 @@ int fsirand(char *);
*/
static int sblock_try[] = SBLOCKSEARCH;
-int printonly = 0, force = 0, ignorelabel = 0;
+static int printonly = 0, force = 0, ignorelabel = 0;
int
main(int argc, char *argv[])
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 148f8cac9f94..18b4a056c470 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -116,7 +116,7 @@ union dinode {
} while (0)
static ufs2_daddr_t inoblk; /* inode block address */
static char inobuf[MAXBSIZE]; /* inode block */
-ino_t maxino; /* last valid inode */
+static ino_t maxino; /* last valid inode */
static int unlabeled; /* unlabeled partition, e.g. vinum volume etc. */
/*
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 3f6b3458edeb..cce74bb8a0ee 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -126,14 +126,14 @@ static state_func_t death_single(void);
static state_func_t run_script(const char *);
-enum { AUTOBOOT, FASTBOOT } runcom_mode = AUTOBOOT;
+static enum { AUTOBOOT, FASTBOOT } runcom_mode = AUTOBOOT;
#define FALSE 0
#define TRUE 1
-int Reboot = FALSE;
-int howto = RB_AUTOBOOT;
+static int Reboot = FALSE;
+static int howto = RB_AUTOBOOT;
-int devfs;
+static int devfs;
static void transition(state_t);
static state_t requested_transition;
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 3f6d2eabaff1..cf142e48f98e 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
#define MOUNT_META_OPTION_FSTAB "fstab"
#define MOUNT_META_OPTION_CURRENT "current"
-int debug, fstab_style, verbose;
+static int debug, fstab_style, verbose;
struct cpa {
char **a;
diff --git a/sbin/mount/mount_fs.c b/sbin/mount/mount_fs.c
index cb25bc512bd6..526d493f9fd3 100644
--- a/sbin/mount/mount_fs.c
+++ b/sbin/mount/mount_fs.c
@@ -58,7 +58,7 @@ static const char rcsid[] =
#include "extern.h"
#include "mntopts.h"
-struct mntopt mopts[] = {
+static struct mntopt mopts[] = {
MOPT_STDOPTS,
MOPT_END
};
diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c
index 922f6cf73211..3b2827eb7ebe 100644
--- a/sbin/mount_cd9660/mount_cd9660.c
+++ b/sbin/mount_cd9660/mount_cd9660.c
@@ -68,7 +68,7 @@ static const char rcsid[] =
#include "mntopts.h"
-struct mntopt mopts[] = {
+static struct mntopt mopts[] = {
MOPT_STDOPTS,
MOPT_UPDATE,
MOPT_END
diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c
index abca9fabe068..4f84954756d9 100644
--- a/sbin/mount_nullfs/mount_nullfs.c
+++ b/sbin/mount_nullfs/mount_nullfs.c
@@ -57,7 +57,7 @@ static const char rcsid[] =
#include "mntopts.h"
-struct mntopt mopts[] = {
+static struct mntopt mopts[] = {
MOPT_STDOPTS,
MOPT_END
};
diff --git a/sbin/mount_udf/mount_udf.c b/sbin/mount_udf/mount_udf.c
index 0175f20f24fd..033db70b9e6f 100644
--- a/sbin/mount_udf/mount_udf.c
+++ b/sbin/mount_udf/mount_udf.c
@@ -61,7 +61,7 @@
#include "mntopts.h"
-struct mntopt mopts[] = {
+static struct mntopt mopts[] = {
MOPT_STDOPTS,
MOPT_UPDATE,
MOPT_END
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index 05f7463fce0c..3dbfef0fe958 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -71,8 +71,8 @@ struct instance {
static LIST_HEAD(, instance) root = LIST_HEAD_INITIALIZER(root);
struct libalias *mla;
-struct instance *mip;
-int ninstance = 1;
+static struct instance *mip;
+static int ninstance = 1;
/*
* Default values for input and output
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 0503ebf0923d..c40026a27df0 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 326c5181b1d1..d25baa79bde9 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 */
diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c
index 9a9959b62558..5eedc484509b 100644
--- a/sbin/rcorder/rcorder.c
+++ b/sbin/rcorder/rcorder.c
@@ -73,9 +73,9 @@ int debug = 0;
#define KEYWORDS_STR "# KEYWORDS:"
#define KEYWORDS_LEN (sizeof(KEYWORDS_STR) - 1)
-int exit_code;
-int file_count;
-char **file_list;
+static int exit_code;
+static int file_count;
+static char **file_list;
typedef int bool;
#define TRUE 1
diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c
index 3930ef19c266..3a92d1db0a85 100644
--- a/sbin/recoverdisk/recoverdisk.c
+++ b/sbin/recoverdisk/recoverdisk.c
@@ -24,7 +24,7 @@
#include <time.h>
#include <unistd.h>
-volatile sig_atomic_t aborting = 0;
+static volatile sig_atomic_t aborting = 0;
static size_t bigsize = 1024 * 1024;
static size_t medsize;
static size_t minsize = 512;
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 8e722ca082b6..7bd93a0c0881 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
#define M *60
#define S *1
#define NOLOG_TIME 5*60
-struct interval {
+static struct interval {
int timeleft, timetowait;
} tlist[] = {
{ 10 H, 5 H },
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index ed13dc584426..5b9a0ed14fb2 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -60,7 +60,7 @@ static void usage(void);
static int swap_on_off(char *name, int ignoreebusy);
static void swaplist(int, int, int);
-enum { SWAPON, SWAPOFF, SWAPCTL } orig_prog, which_prog = SWAPCTL;
+static enum { SWAPON, SWAPOFF, SWAPCTL } orig_prog, which_prog = SWAPCTL;
int
main(int argc, char **argv)
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index c219607a6157..11ffbe6fc6c0 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$");
/* the optimization warning string template */
#define OPTWARN "should optimize for %s with minfree %s %d%%"
-struct uufsd disk;
+static struct uufsd disk;
#define sblock disk.d_fs
void usage(void);
@@ -553,7 +553,7 @@ sbdirty(void)
disk.d_fs.fs_clean = 0;
}
-int blocks;
+static int blocks;
static char clrbuf[MAXBSIZE];
static ufs2_daddr_t
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c
index 6c65aec47feb..f179a4c43b1f 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -63,9 +63,9 @@ static const char rcsid[] =
typedef enum { FIND, REMOVE, CHECKUNIQUE } dowhat;
-struct addrinfo *nfshost_ai = NULL;
-int fflag, vflag;
-char *nfshost;
+static struct addrinfo *nfshost_ai = NULL;
+static int fflag, vflag;
+static char *nfshost;
struct statfs *checkmntlist(char *);
int checkvfsname (const char *, char **);