svn commit: r243295 - stable/9/sbin/camcontrol

Ed Maste emaste at FreeBSD.org
Mon Nov 19 18:25:04 UTC 2012


Author: emaste
Date: Mon Nov 19 18:25:03 2012
New Revision: 243295
URL: http://svnweb.freebsd.org/changeset/base/243295

Log:
  MFC (part of) r227081 (ed):
  
    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.

Modified:
  stable/9/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/9/sbin/camcontrol/   (props changed)

Modified: stable/9/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/9/sbin/camcontrol/camcontrol.c	Mon Nov 19 18:20:27 2012	(r243294)
+++ stable/9/sbin/camcontrol/camcontrol.c	Mon Nov 19 18:25:03 2012	(r243295)
@@ -142,7 +142,7 @@ static const char smppc_opts[] = "a:A:d:
 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"},
@@ -210,8 +210,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,
@@ -4780,7 +4780,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},


More information about the svn-src-stable-9 mailing list