Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/scsictl make a bunch of globals static
details: https://anonhg.NetBSD.org/src/rev/b4ab8bb59397
branches: trunk
changeset: 782469:b4ab8bb59397
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Nov 03 19:26:52 2012 +0000
description:
make a bunch of globals static
diffstat:
sbin/scsictl/scsictl.c | 110 ++++++++++++++++++++++++------------------------
1 files changed, 55 insertions(+), 55 deletions(-)
diffs (truncated from 303 to 300 lines):
diff -r 23344259a238 -r b4ab8bb59397 sbin/scsictl/scsictl.c
--- a/sbin/scsictl/scsictl.c Sat Nov 03 19:14:53 2012 +0000
+++ b/sbin/scsictl/scsictl.c Sat Nov 03 19:26:52 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsictl.c,v 1.34 2012/11/03 19:14:53 jakllsch Exp $ */
+/* $NetBSD: scsictl.c,v 1.35 2012/11/03 19:26:52 jakllsch Exp $ */
/*-
* Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: scsictl.c,v 1.34 2012/11/03 19:14:53 jakllsch Exp $");
+__RCSID("$NetBSD: scsictl.c,v 1.35 2012/11/03 19:26:52 jakllsch Exp $");
#endif
@@ -68,31 +68,31 @@
__dead static void usage(void);
-int fd; /* file descriptor for device */
-const char *dvname; /* device name */
-char dvname_store[MAXPATHLEN]; /* for opendisk(3) */
-const char *cmdname; /* command user issued */
-struct scsi_addr dvaddr; /* SCSI device's address */
+static int fd; /* file descriptor for device */
+const char *dvname; /* device name */
+static char dvname_store[MAXPATHLEN]; /* for opendisk(3) */
+static const char *cmdname; /* command user issued */
+static struct scsi_addr dvaddr; /* SCSI device's address */
-void device_defects(int, char *[]);
-void device_format(int, char *[]);
-void device_identify(int, char *[]);
-void device_reassign(int, char *[]);
-void device_release(int, char *[]);
-void device_reserve(int, char *[]);
-void device_reset(int, char *[]);
-void device_debug(int, char *[]);
-void device_prevent(int, char *[]);
-void device_allow(int, char *[]);
-void device_start(int, char *[]);
-void device_stop(int, char *[]);
-void device_tur(int, char *[]);
-void device_getcache(int, char *[]);
-void device_setcache(int, char *[]);
-void device_flushcache(int, char *[]);
-void device_setspeed(int, char *[]);
+static void device_defects(int, char *[]);
+static void device_format(int, char *[]);
+static void device_identify(int, char *[]);
+static void device_reassign(int, char *[]);
+static void device_release(int, char *[]);
+static void device_reserve(int, char *[]);
+static void device_reset(int, char *[]);
+static void device_debug(int, char *[]);
+static void device_prevent(int, char *[]);
+static void device_allow(int, char *[]);
+static void device_start(int, char *[]);
+static void device_stop(int, char *[]);
+static void device_tur(int, char *[]);
+static void device_getcache(int, char *[]);
+static void device_setcache(int, char *[]);
+static void device_flushcache(int, char *[]);
+static void device_setspeed(int, char *[]);
-struct command device_commands[] = {
+static struct command device_commands[] = {
{ "defects", "[primary] [grown] [block|byte|physical]",
device_defects },
{ "format", "[blocksize [immediate]]", device_format },
@@ -114,11 +114,11 @@
{ NULL, NULL, NULL },
};
-void bus_reset(int, char *[]);
-void bus_scan(int, char *[]);
-void bus_detach(int, char *[]);
+static void bus_reset(int, char *[]);
+static void bus_scan(int, char *[]);
+static void bus_detach(int, char *[]);
-struct command bus_commands[] = {
+static struct command bus_commands[] = {
{ "reset", "", bus_reset },
{ "scan", "target lun", bus_scan },
{ "detach", "target lun", bus_detach },
@@ -220,11 +220,11 @@
* byte READ DEFECT DATA command.
*/
-void print_bf_dd(union scsi_defect_descriptor *);
-void print_bfif_dd(union scsi_defect_descriptor *);
-void print_psf_dd(union scsi_defect_descriptor *);
+static void print_bf_dd(union scsi_defect_descriptor *);
+static void print_bfif_dd(union scsi_defect_descriptor *);
+static void print_psf_dd(union scsi_defect_descriptor *);
-void
+static void
device_defects(int argc, char *argv[])
{
struct scsi_read_defect_data cmd;
@@ -380,7 +380,7 @@
*
* Print a block format defect descriptor.
*/
-void
+static void
print_bf_dd(union scsi_defect_descriptor *dd)
{
u_int32_t block;
@@ -397,7 +397,7 @@
*
* Print a bytes from index format defect descriptor.
*/
-void
+static void
print_bfif_dd(union scsi_defect_descriptor *dd)
{
u_int32_t cylinder;
@@ -421,7 +421,7 @@
*
* Print a physical sector format defect descriptor.
*/
-void
+static void
print_psf_dd(union scsi_defect_descriptor *dd)
{
u_int32_t cylinder;
@@ -445,7 +445,7 @@
*
* Format a direct access device.
*/
-void
+static void
device_format(int argc, char *argv[])
{
u_int32_t blksize;
@@ -639,7 +639,7 @@
* Display the identity of the device, including it's SCSI bus,
* target, lun, and it's vendor/product/revision information.
*/
-void
+static void
device_identify(int argc, char *argv[])
{
struct scsipi_inquiry_data inqbuf;
@@ -682,7 +682,7 @@
*
* Reassign bad blocks on a direct access device.
*/
-void
+static void
device_reassign(int argc, char *argv[])
{
struct scsi_reassign_blocks cmd;
@@ -738,7 +738,7 @@
#ifndef SCSI_RELEASE
#define SCSI_RELEASE 0x17
#endif
-void
+static void
device_release(int argc, char *argv[])
{
struct scsi_test_unit_ready cmd; /* close enough */
@@ -766,7 +766,7 @@
#ifndef SCSI_RESERVE
#define SCSI_RESERVE 0x16
#endif
-void
+static void
device_reserve(int argc, char *argv[])
{
struct scsi_test_unit_ready cmd; /* close enough */
@@ -789,7 +789,7 @@
*
* Issue a reset to a SCSI device.
*/
-void
+static void
device_reset(int argc, char *argv[])
{
@@ -809,7 +809,7 @@
* Set debug level to a SCSI device.
* scsipi will print anything iff SCSIPI_DEBUG set in config.
*/
-void
+static void
device_debug(int argc, char *argv[])
{
int lvl;
@@ -830,7 +830,7 @@
*
* Get the caching parameters for a SCSI disk.
*/
-void
+static void
device_getcache(int argc, char *argv[])
{
struct {
@@ -863,7 +863,7 @@
*
* Set cache enables for a SCSI disk.
*/
-void
+static void
device_setcache(int argc, char *argv[])
{
struct {
@@ -922,7 +922,7 @@
#ifndef SCSI_FLUSHCACHE
#define SCSI_FLUSHCACHE 0x35
#endif
-void
+static void
device_flushcache(int argc, char *argv[])
{
struct scsi_test_unit_ready cmd; /* close enough */
@@ -945,7 +945,7 @@
*
* Set rotation speed to a CD/DVD drive.
*/
-void
+static void
device_setspeed(int argc, char *argv[])
{
u_char cmd[11];
@@ -985,7 +985,7 @@
*
* Issue a prevent to a SCSI device.
*/
-void
+static void
device_prevent(int argc, char *argv[])
{
struct scsi_prevent_allow_medium_removal cmd;
@@ -1009,7 +1009,7 @@
*
* Issue a stop to a SCSI device.
*/
-void
+static void
device_allow(int argc, char *argv[])
{
struct scsi_prevent_allow_medium_removal cmd;
@@ -1033,7 +1033,7 @@
*
* Issue a start to a SCSI device.
*/
-void
+static void
device_start(int argc, char *argv[])
{
struct scsipi_start_stop cmd;
@@ -1057,7 +1057,7 @@
*
* Issue a stop to a SCSI device.
*/
-void
+static void
device_stop(int argc, char *argv[])
{
struct scsipi_start_stop cmd;
@@ -1081,7 +1081,7 @@
*
* Issue a TEST UNIT READY to a SCSI device.
*/
-void
+static void
device_tur(int argc, char *argv[])
{
struct scsi_test_unit_ready cmd;
@@ -1108,7 +1108,7 @@
*
* Issue a reset to a SCSI bus.
*/
-void
+static void
bus_reset(int argc, char *argv[])
{
@@ -1127,7 +1127,7 @@
*
* Rescan a SCSI bus for new devices.
*/
-void
+static void
bus_scan(int argc, char *argv[])
{
struct scbusioscan_args args;
@@ -1164,7 +1164,7 @@
*
* detach SCSI devices from a bus.
*/
-void
+static void
Home |
Main Index |
Thread Index |
Old Index