aboutsummaryrefslogtreecommitdiff
path: root/util-linux/swaponoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/swaponoff.c')
-rw-r--r--util-linux/swaponoff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 8eaf9797c..3c02bdd42 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -65,7 +65,6 @@ static void
65do_em_all() 65do_em_all()
66{ 66{
67 struct mntent *m; 67 struct mntent *m;
68 char swapName[NAME_MAX];
69 FILE *f = setmntent ("/etc/fstab", "r"); 68 FILE *f = setmntent ("/etc/fstab", "r");
70 69
71 if (f == NULL) { 70 if (f == NULL) {
@@ -73,8 +72,8 @@ do_em_all()
73 exit( FALSE); 72 exit( FALSE);
74 } 73 }
75 while ((m = getmntent (f)) != NULL) { 74 while ((m = getmntent (f)) != NULL) {
76 if (!strstr (m->mnt_type, "swap")) { 75 if (!strstr (m->mnt_type, MNTTYPE_SWAP)) {
77 swap_enable_disable( swapName); 76 swap_enable_disable( m->mnt_fsname);
78 } 77 }
79 } 78 }
80 endmntent (f); 79 endmntent (f);