diff --git a/misc/dumpe2fs.8.in b/misc/dumpe2fs.8.in index dd27804ee..2806a2b76 100644 --- a/misc/dumpe2fs.8.in +++ b/misc/dumpe2fs.8.in @@ -23,6 +23,12 @@ prints the super block and blocks group information for the file system present on .I device. .PP +The +.I device +specifier can either be a filename (i.e., /dev/sda1), or a LABEL or UUID +specifier: "\fBLABEL=\fIvolume-label\fR" or "\fBUUID=\fIuuid\fR". (i.e., +LABEL=home or UUID=e40486c6-84d5-4f2f-b99c-032281799c9d). +.PP .B Note: When used with a mounted file system, the printed information may be old or inconsistent. diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index d2d57fb0a..b56d15d98 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -40,6 +40,7 @@ extern int optind; #include "ext2fs/kernel-jbd.h" #include +#include "support/devname.h" #include "support/nls-enable.h" #include "support/plausible.h" #include "../version.h" @@ -673,7 +674,12 @@ int main (int argc, char ** argv) if (optind != argc - 1) usage(); - device_name = argv[optind++]; + device_name = get_devname(NULL, argv[optind++], NULL); + if (!device_name) { + com_err(program_name, 0, _("Unable to resolve '%s'"), + argv[1]); + exit(1); + } flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS | EXT2_FLAG_THREADS; if (force)