summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-12-16 12:47:19 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-12-16 12:47:19 +0000
commit1daa8c727ac98eeb3eb88be82ff1e335d2624ae8 (patch)
treee7effe322162671be05f7e289fb8f91f69473361 /usr.sbin
parent5319a398801f23368225691f44bf07b096eb5e86 (diff)
knf, spacing
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/hostatectl/hostatectl.c30
-rw-r--r--usr.sbin/hostatectl/parser.c10
-rw-r--r--usr.sbin/hoststatectl/hoststatectl.c30
-rw-r--r--usr.sbin/hoststatectl/parser.c10
-rw-r--r--usr.sbin/relayctl/parser.c10
-rw-r--r--usr.sbin/relayctl/relayctl.c30
6 files changed, 60 insertions, 60 deletions
diff --git a/usr.sbin/hostatectl/hostatectl.c b/usr.sbin/hostatectl/hostatectl.c
index 2865ca78d32..05bc4caf935 100644
--- a/usr.sbin/hostatectl/hostatectl.c
+++ b/usr.sbin/hostatectl/hostatectl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostatectl.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: hostatectl.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -186,21 +186,21 @@ show_summary_msg(struct imsg *imsg)
case IMSG_CTL_SERVICE:
service = imsg->data;
printf("service\t%4u\t%-16s\t%s\n",
- service->id, service->name,
- print_service_status(service->flags));
+ service->id, service->name,
+ print_service_status(service->flags));
break;
case IMSG_CTL_TABLE:
table = imsg->data;
printf("table\t%4u\t%-16s\t%s",
- table->id, table->name,
- print_table_status(table->up, table->flags));
+ table->id, table->name,
+ print_table_status(table->up, table->flags));
printf("\n");
break;
case IMSG_CTL_HOST:
host = imsg->data;
printf("host\t%4u\t%-16s\t%s\n",
- host->id, host->name,
- print_host_status(host->up, host->flags));
+ host->id, host->name,
+ print_host_status(host->up, host->flags));
break;
case IMSG_CTL_END:
return (1);
@@ -231,13 +231,13 @@ char *
print_service_status(int flags)
{
if (flags & F_DISABLE) {
- return("disabled");
+ return ("disabled");
} else if (flags & F_DOWN) {
- return("down");
+ return ("down");
} else if (flags & F_BACKUP) {
- return("active (using backup table)");
+ return ("active (using backup table)");
} else
- return("active");
+ return ("active");
}
char *
@@ -261,15 +261,15 @@ char *
print_host_status(int status, int fl)
{
if (fl & F_DISABLE)
- return("disabled");
+ return ("disabled");
switch (status) {
case HOST_DOWN:
- return("down");
+ return ("down");
case HOST_UNKNOWN:
- return("unknown");
+ return ("unknown");
case HOST_UP:
- return("up");
+ return ("up");
default:
errx(1, "invalid status: %d", status);
}
diff --git a/usr.sbin/hostatectl/parser.c b/usr.sbin/hostatectl/parser.c
index a2247a907fc..52ccd7daafd 100644
--- a/usr.sbin/hostatectl/parser.c
+++ b/usr.sbin/hostatectl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: parser.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -72,21 +72,21 @@ static const struct token t_main[] = {
static const struct token t_service[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", SERV_DISABLE, t_service_id},
- {KEYWORD, "enable", SERV_ENABLE, t_service_id},
+ {KEYWORD, "disable", SERV_DISABLE, t_service_id},
+ {KEYWORD, "enable", SERV_ENABLE, t_service_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_table[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
+ {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
{KEYWORD, "enable", TABLE_ENABLE, t_table_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_host[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", HOST_DISABLE, t_host_id},
+ {KEYWORD, "disable", HOST_DISABLE, t_host_id},
{KEYWORD, "enable", HOST_ENABLE, t_host_id},
{ENDTOKEN, "", NONE, NULL}
};
diff --git a/usr.sbin/hoststatectl/hoststatectl.c b/usr.sbin/hoststatectl/hoststatectl.c
index e0e0999f53d..b69292c1b43 100644
--- a/usr.sbin/hoststatectl/hoststatectl.c
+++ b/usr.sbin/hoststatectl/hoststatectl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hoststatectl.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: hoststatectl.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -186,21 +186,21 @@ show_summary_msg(struct imsg *imsg)
case IMSG_CTL_SERVICE:
service = imsg->data;
printf("service\t%4u\t%-16s\t%s\n",
- service->id, service->name,
- print_service_status(service->flags));
+ service->id, service->name,
+ print_service_status(service->flags));
break;
case IMSG_CTL_TABLE:
table = imsg->data;
printf("table\t%4u\t%-16s\t%s",
- table->id, table->name,
- print_table_status(table->up, table->flags));
+ table->id, table->name,
+ print_table_status(table->up, table->flags));
printf("\n");
break;
case IMSG_CTL_HOST:
host = imsg->data;
printf("host\t%4u\t%-16s\t%s\n",
- host->id, host->name,
- print_host_status(host->up, host->flags));
+ host->id, host->name,
+ print_host_status(host->up, host->flags));
break;
case IMSG_CTL_END:
return (1);
@@ -231,13 +231,13 @@ char *
print_service_status(int flags)
{
if (flags & F_DISABLE) {
- return("disabled");
+ return ("disabled");
} else if (flags & F_DOWN) {
- return("down");
+ return ("down");
} else if (flags & F_BACKUP) {
- return("active (using backup table)");
+ return ("active (using backup table)");
} else
- return("active");
+ return ("active");
}
char *
@@ -261,15 +261,15 @@ char *
print_host_status(int status, int fl)
{
if (fl & F_DISABLE)
- return("disabled");
+ return ("disabled");
switch (status) {
case HOST_DOWN:
- return("down");
+ return ("down");
case HOST_UNKNOWN:
- return("unknown");
+ return ("unknown");
case HOST_UP:
- return("up");
+ return ("up");
default:
errx(1, "invalid status: %d", status);
}
diff --git a/usr.sbin/hoststatectl/parser.c b/usr.sbin/hoststatectl/parser.c
index a2247a907fc..52ccd7daafd 100644
--- a/usr.sbin/hoststatectl/parser.c
+++ b/usr.sbin/hoststatectl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: parser.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -72,21 +72,21 @@ static const struct token t_main[] = {
static const struct token t_service[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", SERV_DISABLE, t_service_id},
- {KEYWORD, "enable", SERV_ENABLE, t_service_id},
+ {KEYWORD, "disable", SERV_DISABLE, t_service_id},
+ {KEYWORD, "enable", SERV_ENABLE, t_service_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_table[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
+ {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
{KEYWORD, "enable", TABLE_ENABLE, t_table_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_host[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", HOST_DISABLE, t_host_id},
+ {KEYWORD, "disable", HOST_DISABLE, t_host_id},
{KEYWORD, "enable", HOST_ENABLE, t_host_id},
{ENDTOKEN, "", NONE, NULL}
};
diff --git a/usr.sbin/relayctl/parser.c b/usr.sbin/relayctl/parser.c
index a2247a907fc..52ccd7daafd 100644
--- a/usr.sbin/relayctl/parser.c
+++ b/usr.sbin/relayctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: parser.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -72,21 +72,21 @@ static const struct token t_main[] = {
static const struct token t_service[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", SERV_DISABLE, t_service_id},
- {KEYWORD, "enable", SERV_ENABLE, t_service_id},
+ {KEYWORD, "disable", SERV_DISABLE, t_service_id},
+ {KEYWORD, "enable", SERV_ENABLE, t_service_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_table[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
+ {KEYWORD, "disable", TABLE_DISABLE, t_table_id},
{KEYWORD, "enable", TABLE_ENABLE, t_table_id},
{ENDTOKEN, "", NONE, NULL}
};
static const struct token t_host[] = {
{NOTOKEN, "", NONE, NULL},
- {KEYWORD, "disable", HOST_DISABLE, t_host_id},
+ {KEYWORD, "disable", HOST_DISABLE, t_host_id},
{KEYWORD, "enable", HOST_ENABLE, t_host_id},
{ENDTOKEN, "", NONE, NULL}
};
diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c
index ffb29147dc8..86940034f3a 100644
--- a/usr.sbin/relayctl/relayctl.c
+++ b/usr.sbin/relayctl/relayctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayctl.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */
+/* $OpenBSD: relayctl.c,v 1.2 2006/12/16 12:47:18 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -186,21 +186,21 @@ show_summary_msg(struct imsg *imsg)
case IMSG_CTL_SERVICE:
service = imsg->data;
printf("service\t%4u\t%-16s\t%s\n",
- service->id, service->name,
- print_service_status(service->flags));
+ service->id, service->name,
+ print_service_status(service->flags));
break;
case IMSG_CTL_TABLE:
table = imsg->data;
printf("table\t%4u\t%-16s\t%s",
- table->id, table->name,
- print_table_status(table->up, table->flags));
+ table->id, table->name,
+ print_table_status(table->up, table->flags));
printf("\n");
break;
case IMSG_CTL_HOST:
host = imsg->data;
printf("host\t%4u\t%-16s\t%s\n",
- host->id, host->name,
- print_host_status(host->up, host->flags));
+ host->id, host->name,
+ print_host_status(host->up, host->flags));
break;
case IMSG_CTL_END:
return (1);
@@ -231,13 +231,13 @@ char *
print_service_status(int flags)
{
if (flags & F_DISABLE) {
- return("disabled");
+ return ("disabled");
} else if (flags & F_DOWN) {
- return("down");
+ return ("down");
} else if (flags & F_BACKUP) {
- return("active (using backup table)");
+ return ("active (using backup table)");
} else
- return("active");
+ return ("active");
}
char *
@@ -261,15 +261,15 @@ char *
print_host_status(int status, int fl)
{
if (fl & F_DISABLE)
- return("disabled");
+ return ("disabled");
switch (status) {
case HOST_DOWN:
- return("down");
+ return ("down");
case HOST_UNKNOWN:
- return("unknown");
+ return ("unknown");
case HOST_UP:
- return("up");
+ return ("up");
default:
errx(1, "invalid status: %d", status);
}