From: Theodore Ts'o Date: Mon, 6 Dec 2010 22:07:27 +0000 (-0500) Subject: e2fsck: Do blkid interpretation on the external journal specifier X-Git-Tag: v1.41.13~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b95ca92811e182c10150f8d2d08d6113af2abdf9;p=thirdparty%2Fe2fsprogs.git e2fsck: Do blkid interpretation on the external journal specifier If the user specifies "e2fsck -j UUID=XXX", e2fsck should do blkid interpretation, since e2fsck does it with the base file system name. So from the sake of consistency and user convenience, we should do it here too. Addresses-Debian-Bug: #559315 Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/unix.c b/e2fsck/unix.c index cc3c39ded..414dd1166 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -750,7 +750,14 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) goto sscanf_err; break; case 'j': - ctx->journal_name = string_copy(ctx, optarg, 0); + ctx->journal_name = blkid_get_devname(ctx->blkid, + optarg, NULL); + if (!ctx->journal_name) { + com_err(ctx->program_name, 0, + _("Unable to resolve '%s'"), + optarg); + fatal_error(ctx, 0); + } break; case 'P': res = sscanf(optarg, "%d", &ctx->process_inode_size);