aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
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 478dc2409..9f465f131 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)
{