swaponoff: add uuid/label support. By Natanael Copa

function                                             old     new   delta
swap_enable_disable                                  130     150     +20
resolve_mount_spec                                    76      96     +20
mount_main                                          1152    1154      +2
findfs_main                                          125      80     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 42/-45)             Total: -3 bytes

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 478dc24..9f465f1 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -50,7 +50,9 @@
 #include "libbb.h"
 
 #if ENABLE_FEATURE_MOUNT_LABEL
-#include "volume_id.h"
+# include "volume_id.h"
+#else
+# define resolve_mount_spec(fsname) ((void)0)
 #endif
 
 // Needed for nfs support only
@@ -290,23 +292,6 @@
 #define verbose_mount(...) mount(__VA_ARGS__)
 #endif
 
-#if ENABLE_FEATURE_MOUNT_LABEL
-static void resolve_mount_spec(char **fsname)
-{
-	char *tmp = NULL;
-
-	if (!strncmp(*fsname, "UUID=", 5))
-		tmp = get_devname_from_uuid(*fsname + 5);
-	else if (!strncmp(*fsname, "LABEL=", 6))
-		tmp = get_devname_from_label(*fsname + 6);
-
-	if (tmp)
-		*fsname = tmp;
-}
-#else
-#define resolve_mount_spec(fsname) ((void)0)
-#endif
-
 // Append mount options to string
 static void append_mount_options(char **oldopts, const char *newopts)
 {