summary refs log tree commit diff
path: root/src/minutils/s6-swapon.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:44:14 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:44:14 +0000
commit54d4b6e74bf539930db2cafbe075416894900076 (patch)
tree29df64c4ff1eddc3c692b82556e3dde5dc2ae0ee /src/minutils/s6-swapon.c
parent495d625add9e52b29a98c4fa2627a45d20d44849 (diff)
downloads6-linux-utils-54d4b6e74bf539930db2cafbe075416894900076.tar.gz
s6-linux-utils-54d4b6e74bf539930db2cafbe075416894900076.tar.xz
s6-linux-utils-54d4b6e74bf539930db2cafbe075416894900076.zip
Fix a few omissions 2.3.0.0
Diffstat (limited to 'src/minutils/s6-swapon.c')
-rw-r--r--src/minutils/s6-swapon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/minutils/s6-swapon.c b/src/minutils/s6-swapon.c
index 6edd743..9a1b208 100644
--- a/src/minutils/s6-swapon.c
+++ b/src/minutils/s6-swapon.c
@@ -1,12 +1,12 @@
 /* ISC license. */
 
+#include <unistd.h>
+#include <sys/swap.h>
+#include <string.h>
 #include <stdio.h>
 #include <mntent.h>
-#include <skalibs/bytestr.h>
 #include <skalibs/strerr2.h>
 
-extern int swapon (const char *, unsigned int) ;
-
 #define USAGE "s6-swapon device <or> s6-swapon -a"
 
 static int swaponall ()
@@ -16,7 +16,7 @@ static int swaponall ()
   FILE *yuck = setmntent("/etc/fstab", "r") ;
   if (!yuck) strerr_diefu1sys(111, "setmntent /etc/fstab") ;
   while ((d = getmntent(yuck)))
-    if (!str_diff(d->mnt_type, "swap") && (swapon(d->mnt_fsname, 0) == -1))
+    if (!strcmp(d->mnt_type, "swap") && (swapon(d->mnt_fsname, 0) == -1))
     {
       e++ ;
       strerr_warnwu2sys("swapon ", d->mnt_fsname) ;