From 2d15576dfe8ffd8521a6f4211cef3d2a663dc379 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 17 Aug 2001 03:48:11 -0600 Subject: 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=). 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. --- misc/util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'misc/util.c') 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++; -- cgit v1.2.3