* Copyright (c) 1980 Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
static char sccsid
[] = "@(#)swapon.c 5.5 (Berkeley) %G%";
register struct fstab
*fsp
;
while ((ch
= getopt(argc
, argv
, "a")) != EOF
)
while (fsp
= getfsent()) {
if (strcmp(fsp
->fs_type
, FSTAB_SW
))
if (add(fsp
->fs_spec
, 1))
printf("swapon: adding %s as swap device\n",
if (swapon(name
) == -1) {
fprintf(stderr
, "swapon: %s: device not configured\n",
"swapon: %s: device already in use\n",
fprintf(stderr
, "swapon: %s: ", name
);
fprintf(stderr
, "usage: swapon [-a] [special_file ...]\n");