projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c7d891c
)
date and time created 80/10/01 17:28:45 by bill
author
Bill Joy
<bill@ucbvax.Berkeley.EDU>
Thu, 2 Oct 1980 09:28:45 +0000
(
01:28
-0800)
committer
Bill 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]
patch
|
blob
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
+++ b/
usr/src/sbin/swapon/swapon.c
@@ -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);
+}