date and time created 80/10/01 17:28:45 by bill
authorBill Joy <bill@ucbvax.Berkeley.EDU>
Thu, 2 Oct 1980 09:28:45 +0000 (01:28 -0800)
committerBill Joy <bill@ucbvax.Berkeley.EDU>
Thu, 2 Oct 1980 09:28:45 +0000 (01:28 -0800)
SCCS-vsn: sbin/swapon/swapon.c 4.1

usr/src/sbin/swapon/swapon.c [new file with mode: 0644]

diff --git a/usr/src/sbin/swapon/swapon.c b/usr/src/sbin/swapon/swapon.c
new file mode 100644 (file)
index 0000000..2587d39
--- /dev/null
@@ -0,0 +1,25 @@
+static char *sccsid = "@(#)swapon.c    4.1 (Berkeley) %G%";
+#include <stdio.h>
+
+#define        VSWAPON 85
+
+main(argc, argv)
+       int argc;
+       char *argv[];
+{
+       int stat = 0;
+
+       --argc, argv++;
+       if (argc == 0) {
+               fprintf(stderr, "usage: swapon name...\n");
+               exit(1);
+       }
+       do {
+               if (syscall(VSWAPON, *argv++) == -1) {
+                       stat = 1;
+                       perror(argv[-1]);
+               }
+               argc--;
+       } while (argc > 0);
+       exit(stat);
+}