summaryrefslogtreecommitdiff
path: root/misc/util.c
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@clusterfs.com>2001-08-17 03:48:11 -0600
committerAndreas Dilger <adilger@clusterfs.com>2001-08-17 03:48:11 -0600
commit2d15576dfe8ffd8521a6f4211cef3d2a663dc379 (patch)
tree926780492e8c88d8fcef4379135c2dc1bbe0faac /misc/util.c
parentf27728adac8c8332313d84110f50c3568093b4a8 (diff)
downloade2fsprogs-2d15576dfe8ffd8521a6f4211cef3d2a663dc379.tar.gz
get_device_by_label.[ch], fsck.c, util.c: New interpret_spec()
function in get_device_by_label.c to allow the use of UUID= or LABEL= when creating filesystems which use external journal dev (e.g. mke2fs -J device=LABEL=<journal_label>). tune2fs.c: Use superblock s_journal_uuid to locate an external journal device instead of s_journal_dev when removing it. Allow opening journal devices to set the label and UUID in the ext2 superblock. mke2fs.c, tune2fs.c: Free journal_device after use, as it is malloc'd in interpret spec.
Diffstat (limited to 'misc/util.c')
-rw-r--r--misc/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/util.c b/misc/util.c
index b05a2f1a..98ad0b25 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -26,6 +26,7 @@
#include "ext2fs/ext2_fs.h"
#include "ext2fs/ext2fs.h"
#include "nls-enable.h"
+#include "get_device_by_label.h"
#include "util.h"
#ifndef HAVE_STRCASECMP
@@ -154,11 +155,11 @@ void parse_journal_opts(const char *opts)
arg ? arg : "NONE");
#endif
if (strcmp(token, "device") == 0) {
- if (!arg) {
+ journal_device = interpret_spec(arg);
+ if (!journal_device) {
journal_usage++;
continue;
}
- journal_device = arg;
} else if (strcmp(token, "size") == 0) {
if (!arg) {
journal_usage++;