summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorNatanael Copa2009-09-20 04:28:22 +0200
committerDenys Vlasenko2009-09-20 04:28:22 +0200
commit9aff29997ed22932f78aa8d8c7c2412e9d3f49e5 (patch)
tree8df24e36d81c3f4f6d1cf6b9892341f96b5ecb92 /util-linux/mount.c
parent2bf6634ef46b5360e6381e61b27415e52a1cd7c7 (diff)
downloadbusybox-9aff29997ed22932f78aa8d8c7c2412e9d3f49e5.zip
busybox-9aff29997ed22932f78aa8d8c7c2412e9d3f49e5.tar.gz
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>
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c21
1 files changed, 3 insertions, 18 deletions
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 @@ static int verbose_mount(const char *source, const char *target,
#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)
{