projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add rps and minfree arguments
[unix-history]
/
usr
/
src
/
sbin
/
swapon
/
swapon.c
diff --git
a/usr/src/sbin/swapon/swapon.c
b/usr/src/sbin/swapon/swapon.c
index
f1a513f
..
74e64ad
100644
(file)
--- a/
usr/src/sbin/swapon/swapon.c
+++ b/
usr/src/sbin/swapon/swapon.c
@@
-1,4
+1,4
@@
-static char *sccsid = "@(#)swapon.c 4.
3
(Berkeley) %G%";
+static char *sccsid = "@(#)swapon.c 4.
4
(Berkeley) %G%";
#include <stdio.h>
#include <fstab.h>
#include <stdio.h>
#include <fstab.h>
@@
-22,10
+22,13
@@
main(argc, argv)
while ( (fsp = getfsent()) != 0){
if (strcmp(fsp->fs_type, FSTAB_SW) != 0)
continue;
while ( (fsp = getfsent()) != 0){
if (strcmp(fsp->fs_type, FSTAB_SW) != 0)
continue;
-
fprintf(stdout,
"Adding %s as swap device\n",
+
printf(
"Adding %s as swap device\n",
fsp->fs_spec);
if (syscall(VSWAPON, fsp->fs_spec) == -1) {
fsp->fs_spec);
if (syscall(VSWAPON, fsp->fs_spec) == -1) {
- perror(fsp->fs_spec);
+ extern errno;
+ extern char *sys_errlist[];
+ printf("%s: %s\n",
+ sys_errlist[errno]);
stat = 1;
}
}
stat = 1;
}
}