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
This commit is contained in:
Navdeep Parhar 2019-06-30 03:14:04 +00:00
parent da4f5bdaff
commit 57f317e60a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349552
6 changed files with 24 additions and 18 deletions

View File

@ -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);
}

View File

@ -340,9 +340,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);
}

View File

@ -414,9 +414,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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -399,9 +399,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);
}