diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2009-09-20 04:28:22 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-20 04:28:22 +0200 |
commit | 9aff29997ed22932f78aa8d8c7c2412e9d3f49e5 (patch) | |
tree | 8df24e36d81c3f4f6d1cf6b9892341f96b5ecb92 /util-linux/mount.c | |
parent | 2bf6634ef46b5360e6381e61b27415e52a1cd7c7 (diff) | |
download | busybox-w32-9aff29997ed22932f78aa8d8c7c2412e9d3f49e5.tar.gz busybox-w32-9aff29997ed22932f78aa8d8c7c2412e9d3f49e5.tar.bz2 busybox-w32-9aff29997ed22932f78aa8d8c7c2412e9d3f49e5.zip |
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.c | 21 |
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 @@ | |||
50 | #include "libbb.h" | 50 | #include "libbb.h" |
51 | 51 | ||
52 | #if ENABLE_FEATURE_MOUNT_LABEL | 52 | #if ENABLE_FEATURE_MOUNT_LABEL |
53 | #include "volume_id.h" | 53 | # include "volume_id.h" |
54 | #else | ||
55 | # define resolve_mount_spec(fsname) ((void)0) | ||
54 | #endif | 56 | #endif |
55 | 57 | ||
56 | // Needed for nfs support only | 58 | // Needed for nfs support only |
@@ -290,23 +292,6 @@ static int verbose_mount(const char *source, const char *target, | |||
290 | #define verbose_mount(...) mount(__VA_ARGS__) | 292 | #define verbose_mount(...) mount(__VA_ARGS__) |
291 | #endif | 293 | #endif |
292 | 294 | ||
293 | #if ENABLE_FEATURE_MOUNT_LABEL | ||
294 | static void resolve_mount_spec(char **fsname) | ||
295 | { | ||
296 | char *tmp = NULL; | ||
297 | |||
298 | if (!strncmp(*fsname, "UUID=", 5)) | ||
299 | tmp = get_devname_from_uuid(*fsname + 5); | ||
300 | else if (!strncmp(*fsname, "LABEL=", 6)) | ||
301 | tmp = get_devname_from_label(*fsname + 6); | ||
302 | |||
303 | if (tmp) | ||
304 | *fsname = tmp; | ||
305 | } | ||
306 | #else | ||
307 | #define resolve_mount_spec(fsname) ((void)0) | ||
308 | #endif | ||
309 | |||
310 | // Append mount options to string | 295 | // Append mount options to string |
311 | static void append_mount_options(char **oldopts, const char *newopts) | 296 | static void append_mount_options(char **oldopts, const char *newopts) |
312 | { | 297 | { |