From b95ca92811e182c10150f8d2d08d6113af2abdf9 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 6 Dec 2010 17:07:27 -0500 Subject: [PATCH] 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" --- e2fsck/unix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e2fsck/unix.c b/e2fsck/unix.c index cc3c39d..414dd11 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); -- 1.8.3.1