Author: np Date: Sun Jun 30 03:14:04 2019 New Revision: 349552 URL: https://svnweb.freebsd.org/changeset/base/349552
Log: Display the approximate space needed when a minidump fails due to lack of space. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20801 Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/arm/arm/minidump_machdep.c head/sys/arm64/arm64/minidump_machdep.c head/sys/i386/i386/minidump_machdep_base.c head/sys/mips/mips/minidump_machdep.c head/sys/riscv/riscv/minidump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/amd64/amd64/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -448,9 +448,10 @@ minidumpsys(struct dumperinfo *di) } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/arm/arm/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -340,9 +340,10 @@ fail: if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/arm64/arm64/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -414,9 +414,10 @@ fail: } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/i386/i386/minidump_machdep_base.c Sun Jun 30 03:14:04 2019 (r349552) @@ -348,9 +348,10 @@ minidumpsys(struct dumperinfo *di) if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/mips/mips/minidump_machdep.c ============================================================================== --- head/sys/mips/mips/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/mips/mips/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -348,9 +348,10 @@ fail: if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/riscv/riscv/minidump_machdep.c ============================================================================== --- head/sys/riscv/riscv/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/riscv/riscv/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -399,9 +399,10 @@ fail: } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"