Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin static + __dead
details: https://anonhg.NetBSD.org/src/rev/5dbc024e7bb5
branches: trunk
changeset: 768960:5dbc024e7bb5
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Aug 29 14:29:21 2011 +0000
description:
static + __dead
diffstat:
sbin/brconfig/brconfig.c | 144 +++++++++++++++++++++++-----------------------
sbin/savecore/savecore.c | 111 +++++++++++++++--------------------
2 files changed, 121 insertions(+), 134 deletions(-)
diffs (truncated from 658 to 300 lines):
diff -r 7c7058ab5e6c -r 5dbc024e7bb5 sbin/brconfig/brconfig.c
--- a/sbin/brconfig/brconfig.c Mon Aug 29 14:24:03 2011 +0000
+++ b/sbin/brconfig/brconfig.c Mon Aug 29 14:29:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brconfig.c,v 1.12 2009/03/16 12:56:19 lukem Exp $ */
+/* $NetBSD: brconfig.c,v 1.13 2011/08/29 14:29:21 joerg Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: brconfig.c,v 1.12 2009/03/16 12:56:19 lukem Exp $");
+__RCSID("$NetBSD: brconfig.c,v 1.13 2011/08/29 14:29:21 joerg Exp $");
#endif
@@ -74,29 +74,29 @@
#define CMD_INVERT 0x01 /* "invert" the sense of the command */
-void cmd_add(const struct command *, int, const char *, char **);
-void cmd_delete(const struct command *, int, const char *, char **);
-void cmd_up(const struct command *, int, const char *, char **);
-void cmd_down(const struct command *, int, const char *, char **);
-void cmd_discover(const struct command *, int, const char *, char **);
-void cmd_learn(const struct command *, int, const char *, char **);
-void cmd_flush(const struct command *, int, const char *, char **);
-void cmd_flushall(const struct command *, int, const char *, char **);
-void cmd_static(const struct command *, int, const char *, char **);
-void cmd_deladdr(const struct command *, int, const char *, char **);
-void cmd_addr(const struct command *, int, const char *, char **);
-void cmd_maxaddr(const struct command *, int, const char *, char **);
-void cmd_hellotime(const struct command *, int, const char *, char **);
-void cmd_fwddelay(const struct command *, int, const char *, char **);
-void cmd_maxage(const struct command *, int, const char *, char **);
-void cmd_priority(const struct command *, int, const char *, char **);
-void cmd_ifpriority(const struct command *, int, const char *, char **);
-void cmd_ifpathcost(const struct command *, int, const char *, char **);
-void cmd_timeout(const struct command *, int, const char *, char **);
-void cmd_stp(const struct command *, int, const char *, char **);
-void cmd_ipf(const struct command *, int, const char *, char **);
+static void cmd_add(const struct command *, int, const char *, char **);
+static void cmd_delete(const struct command *, int, const char *, char **);
+static void cmd_up(const struct command *, int, const char *, char **);
+static void cmd_down(const struct command *, int, const char *, char **);
+static void cmd_discover(const struct command *, int, const char *, char **);
+static void cmd_learn(const struct command *, int, const char *, char **);
+static void cmd_flush(const struct command *, int, const char *, char **);
+static void cmd_flushall(const struct command *, int, const char *, char **);
+static void cmd_static(const struct command *, int, const char *, char **);
+static void cmd_deladdr(const struct command *, int, const char *, char **);
+static void cmd_addr(const struct command *, int, const char *, char **);
+static void cmd_maxaddr(const struct command *, int, const char *, char **);
+static void cmd_hellotime(const struct command *, int, const char *, char **);
+static void cmd_fwddelay(const struct command *, int, const char *, char **);
+static void cmd_maxage(const struct command *, int, const char *, char **);
+static void cmd_priority(const struct command *, int, const char *, char **);
+static void cmd_ifpriority(const struct command *, int, const char *, char **);
+static void cmd_ifpathcost(const struct command *, int, const char *, char **);
+static void cmd_timeout(const struct command *, int, const char *, char **);
+static void cmd_stp(const struct command *, int, const char *, char **);
+static void cmd_ipf(const struct command *, int, const char *, char **);
-const struct command command_table[] = {
+static const struct command command_table[] = {
{ "add", 1, 0, cmd_add },
{ "delete", 1, 0, cmd_delete },
@@ -134,25 +134,25 @@
{ NULL, 0, 0, NULL },
};
-void printall(int);
-void status(int, const char *);
-int is_bridge(const char *);
-void show_config(int, const char *, const char *);
-void show_interfaces(int, const char *, const char *);
-void show_addresses(int, const char *, const char *);
-int get_val(const char *, u_long *);
-int do_cmd(int, const char *, u_long, void *, size_t, int);
-void do_ifflag(int, const char *, int, int);
-void do_bridgeflag(int, const char *, const char *, int, int);
+static void printall(int);
+static void status(int, const char *);
+static int is_bridge(const char *);
+static void show_config(int, const char *, const char *);
+static void show_interfaces(int, const char *, const char *);
+static void show_addresses(int, const char *, const char *);
+static int get_val(const char *, u_long *);
+static int do_cmd(int, const char *, u_long, void *, size_t, int);
+static void do_ifflag(int, const char *, int, int);
+static void do_bridgeflag(int, const char *, const char *, int, int);
-void printb(const char *, u_int, const char *);
+static void printb(const char *, u_int, const char *);
-void usage(void);
+__dead static void usage(void);
-int aflag;
+static int aflag;
-struct ifreq g_ifr;
-int g_ifr_updated;
+static struct ifreq g_ifr;
+static int g_ifr_updated;
int
main(int argc, char *argv[])
@@ -239,7 +239,7 @@
exit (0);
}
-void
+static void
usage(void)
{
static const char *usage_strings[] = {
@@ -278,7 +278,7 @@
exit(1);
}
-int
+static int
is_bridge(const char *bridge)
{
@@ -289,7 +289,7 @@
return (1);
}
-void
+static void
printb(const char *s, u_int v, const char *bits)
{
int i, any = 0;
@@ -317,7 +317,7 @@
}
}
-void
+static void
printall(int sock)
{
struct ifaddrs *ifap, *ifa;
@@ -338,7 +338,7 @@
freeifaddrs(ifap);
}
-void
+static void
status(int sock, const char *bridge)
{
struct ifreq ifr;
@@ -370,7 +370,7 @@
show_addresses(sock, bridge, "\t\t");
}
-void
+static void
show_config(int sock, const char *bridge, const char *prefix)
{
struct ifbrparam param;
@@ -408,7 +408,7 @@
ipfflags);
}
-void
+static void
show_interfaces(int sock, const char *bridge, const char *prefix)
{
static const char *stpstates[] = {
@@ -459,7 +459,7 @@
free(inbuf);
}
-void
+static void
show_addresses(int sock, const char *bridge, const char *prefix)
{
struct ifbaconf ifbac;
@@ -494,7 +494,7 @@
free(inbuf);
}
-int
+static int
get_val(const char *cp, u_long *valp)
{
char *endptr;
@@ -509,7 +509,7 @@
return (0);
}
-int
+static int
do_cmd(int sock, const char *bridge, u_long op, void *arg, size_t argsize,
int set)
{
@@ -525,7 +525,7 @@
return (ioctl(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd));
}
-void
+static void
do_ifflag(int sock, const char *bridge, int flag, int set)
{
@@ -537,7 +537,7 @@
g_ifr_updated = 1;
}
-void
+static void
do_bridgeflag(int sock, const char *bridge, const char *ifs, int flag,
int set)
{
@@ -557,7 +557,7 @@
err(1, "unable to set bridge flags");
}
-void
+static void
cmd_add(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -570,7 +570,7 @@
err(1, "%s %s", cmd->cmd_keyword, argv[0]);
}
-void
+static void
cmd_delete(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -582,7 +582,7 @@
err(1, "%s %s", cmd->cmd_keyword, argv[0]);
}
-void
+static void
cmd_up(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -590,7 +590,7 @@
do_ifflag(sock, bridge, IFF_UP, 1);
}
-void
+static void
cmd_down(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -598,7 +598,7 @@
do_ifflag(sock, bridge, IFF_UP, 0);
}
-void
+static void
cmd_discover(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -607,7 +607,7 @@
(cmd->cmd_flags & CMD_INVERT) ? 0 : 1);
}
-void
+static void
cmd_learn(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -616,7 +616,7 @@
(cmd->cmd_flags & CMD_INVERT) ? 0 : 1);
}
-void
+static void
cmd_stp(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -625,7 +625,7 @@
(cmd->cmd_flags & CMD_INVERT) ? 0 : 1);
}
-void
+static void
cmd_flush(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
@@ -637,7 +637,7 @@
err(1, "%s", cmd->cmd_keyword);
}
-void
+static void
cmd_flushall(const struct command *cmd, int sock, const char *bridge,
char **argv)
{
Home |
Main Index |
Thread Index |
Old Index