Check the returned name from blkid_get_devname in tune2fs and
e2fsck, and print an error if the requested LABEL/UUID does
not exist (previously, we core dumped!)
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 33722e3..9109773 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -638,6 +638,11 @@
!cflag && !swapfs && !(ctx->options & E2F_OPT_COMPRESS_DIRS))
ctx->options |= E2F_OPT_READONLY;
ctx->filesystem_name = blkid_get_devname(ctx->blkid, argv[optind], 0);
+ if (!ctx->filesystem_name) {
+ com_err(ctx->program_name, 0, _("Unable to resolve '%s'"),
+ argv[optind]);
+ fatal_error(ctx, 0);
+ }
if (extended_opts)
parse_extended_opts(ctx, extended_opts);