print on standard output
authorBill Joy <bill@ucbvax.Berkeley.EDU>
Thu, 16 Oct 1980 17:05:05 +0000 (09:05 -0800)
committerBill Joy <bill@ucbvax.Berkeley.EDU>
Thu, 16 Oct 1980 17:05:05 +0000 (09:05 -0800)
SCCS-vsn: sbin/swapon/swapon.c 4.4

usr/src/sbin/swapon/swapon.c

index f1a513f..74e64ad 100644 (file)
@@ -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;
                        }
                }