summaryrefslogtreecommitdiff
path: root/sbin/swapctl
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-03 22:32:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-03 22:32:35 +0000
commita9a4354fed4cec65ca359fe04095a7a7d4823a8a (patch)
tree0fedc69061ae9a279d3db23f185ff0b038a706d9 /sbin/swapctl
parent4c287e033bc1d7be66ec3f6c6735246a781a9e08 (diff)
ansi
Diffstat (limited to 'sbin/swapctl')
-rw-r--r--sbin/swapctl/swapctl.c23
-rw-r--r--sbin/swapctl/swaplist.c9
2 files changed, 10 insertions, 22 deletions
diff --git a/sbin/swapctl/swapctl.c b/sbin/swapctl/swapctl.c
index 74bfbe0dd5a..33b7e28bdea 100644
--- a/sbin/swapctl/swapctl.c
+++ b/sbin/swapctl/swapctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swapctl.c,v 1.9 2002/05/15 23:30:08 art Exp $ */
+/* $OpenBSD: swapctl.c,v 1.10 2002/07/03 22:32:33 deraadt Exp $ */
/* $NetBSD: swapctl.c,v 1.9 1998/07/26 20:23:15 mycroft Exp $ */
/*
@@ -116,9 +116,7 @@ static int swapon_command(int, char **);
extern char *__progname; /* from crt0.o */
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c;
@@ -242,9 +240,7 @@ main(argc, argv)
* swapon_command: emulate the old swapon(8) program.
*/
int
-swapon_command(argc, argv)
- int argc;
- char **argv;
+swapon_command(int argc, char **argv)
{
int ch, fiztab = 0;
@@ -297,8 +293,7 @@ swapon_command(argc, argv)
* change_priority: change the priority of a swap device.
*/
void
-change_priority(path)
- char *path;
+change_priority(char *path)
{
if (swapctl(SWAP_CTL, path, pri) < 0)
@@ -309,8 +304,7 @@ change_priority(path)
* add_swap: add the pathname to the list of swap devices.
*/
void
-add_swap(path)
- char *path;
+add_swap(char *path)
{
if (swapctl(SWAP_ON, path, pri) < 0)
@@ -322,8 +316,7 @@ add_swap(path)
* del_swap: remove the pathname from the list of swap devices.
*/
void
-del_swap(path)
- char *path;
+del_swap(char *path)
{
if (swapctl(SWAP_OFF, path, pri) < 0)
@@ -331,7 +324,7 @@ del_swap(path)
}
void
-do_fstab()
+do_fstab(void)
{
struct fstab *fp;
char *s;
@@ -441,7 +434,7 @@ do_fstab()
}
void
-usage()
+usage(void)
{
fprintf(stderr, "usage: %s -A [-p priority] [-t blk|noblk]\n",
diff --git a/sbin/swapctl/swaplist.c b/sbin/swapctl/swaplist.c
index 695642c040a..8447688c9d6 100644
--- a/sbin/swapctl/swaplist.c
+++ b/sbin/swapctl/swaplist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swaplist.c,v 1.3 2000/02/26 04:06:23 hugh Exp $ */
+/* $OpenBSD: swaplist.c,v 1.4 2002/07/03 22:32:34 deraadt Exp $ */
/* $NetBSD: swaplist.c,v 1.8 1998/10/08 10:00:31 mrg Exp $ */
/*
@@ -50,12 +50,7 @@
#include "swapctl.h"
void
-list_swap(pri, kflag, pflag, tflag, dolong)
- int pri;
- int kflag;
- int pflag;
- int tflag;
- int dolong;
+list_swap(int pri, int kflag, int pflag, int tflag, int dolong)
{
struct swapent *sep, *fsep;
long blocksize;