swapon: do not use FEATURE_MOUNT_LABEL, have your own FEATURE_SWAPONOFF_LABEL
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Jul 2017 08:58:08 +0000 (10:58 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Jul 2017 08:58:08 +0000 (10:58 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mount.c
util-linux/swaponoff.c
util-linux/volume_id/get_devname.c

index 823b7c13b4749121b852a5a06195b01785a8ec67..5f030607c3382037f7b885937c2009cec55ff8ea 100644 (file)
@@ -64,7 +64,6 @@
 //config:      help
 //config:      This allows for specifying a device by label or uuid, rather than by
 //config:      name. This feature utilizes the same functionality as blkid/findfs.
-//config:      This also enables label or uuid support for swapon.
 //config:
 //config:config FEATURE_MOUNT_NFS
 //config:      bool "Support mounting NFS file systems on Linux < 2.6.23"
index bda0687d66dc723aed409957c633a68bc501e034..f432ce18012c63447ef9c5cbfc6600dbfb01c333 100644 (file)
 //config:      bool "swapoff (4.3 kb)"
 //config:      default y
 //config:      select PLATFORM_LINUX
+//config:
+//config:config FEATURE_SWAPONOFF_LABEL
+//config:      bool "Support specifying devices by label or UUID"
+//config:      default y
+//config:      depends on SWAPON || SWAPOFF
+//config:      select VOLUMEID
+//config:      help
+//config:      This allows for specifying a device by label or uuid, rather than by
+//config:      name. This feature utilizes the same functionality as blkid/findfs.
 
 //                  APPLET_ODDNAME:name     main         location     suid_type     help
 //applet:IF_SWAPON( APPLET_ODDNAME(swapon,  swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon))
@@ -72,7 +81,7 @@
 # include <sys/swap.h>
 #endif
 
-#if ENABLE_FEATURE_MOUNT_LABEL
+#if ENABLE_FEATURE_SWAPONOFF_LABEL
 # include "volume_id.h"
 #else
 # define resolve_mount_spec(fsname) ((void)0)
index b64d28cebd278cea2b08c9a2a48d1baed31e15f5..34f5d119ff951c179589de22418144b6f7bb71dd 100644 (file)
@@ -11,6 +11,7 @@
 //kbuild:lib-$(CONFIG_BLKID) += get_devname.o
 //kbuild:lib-$(CONFIG_FINDFS) += get_devname.o
 //kbuild:lib-$(CONFIG_FEATURE_MOUNT_LABEL) += get_devname.o
+//kbuild:lib-$(CONFIG_FEATURE_SWAPONOFF_LABEL) += get_devname.o
 
 #include <sys/mount.h> /* BLKGETSIZE64 */
 #if !defined(BLKGETSIZE64)