e2fsprogs/e2fsprogs-1.33-fsckdevdisplay.diff

31 lines
972 B
Diff

--- e2fsck/unix.c
+++ e2fsck/unix.c
@@ -995,8 +995,13 @@
*/
if (ctx->device_name == 0 &&
(sb->s_volume_name[0] != 0)) {
- ctx->device_name = string_copy(ctx, sb->s_volume_name,
- sizeof(sb->s_volume_name));
+ ctx->device_name = malloc(sizeof(sb->s_volume_name)+4+
+ (ctx->filesystem_name?strlen(ctx->filesystem_name):1));
+ if (ctx->device_name) {
+ sprintf (ctx->device_name, "%s (%s)",
+ sb->s_volume_name,
+ (ctx->filesystem_name? ctx->filesystem_name: "?"));
+ }
}
if (ctx->device_name == 0)
ctx->device_name = ctx->filesystem_name;
--- misc/fsck.c
+++ misc/fsck.c
@@ -615,6 +615,9 @@
status = EXIT_ERROR;
}
inst->exit_status = status;
+ if (status > 1)
+ printf(_("%s %s failed (status 0x%x). Run manually!\n"),
+ inst->prog, inst->device, status);
if (progress && (inst->flags & FLAG_PROGRESS) &&
!progress_active()) {
for (inst2 = instance_list; inst2; inst2 = inst2->next) {