summaryrefslogtreecommitdiffhomepage
path: root/util-linux/swaponoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/swaponoff.c')
-rw-r--r--util-linux/swaponoff.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 863f7734a..33ad00ac1 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -11,6 +11,12 @@
#include <mntent.h>
#include <sys/swap.h>
+#if ENABLE_FEATURE_MOUNT_LABEL
+# include "volume_id.h"
+#else
+# define resolve_mount_spec(fsname) ((void)0)
+#endif
+
#if ENABLE_FEATURE_SWAPON_PRI
struct globals {
int flags;
@@ -26,6 +32,7 @@ static int swap_enable_disable(char *device)
int status;
struct stat st;
+ resolve_mount_spec(&device);
xstat(device, &st);
#if ENABLE_DESKTOP