Page MenuHomeFreeBSD

Display the approximate space needed when a minidump fails due to lack of space.

Authored by np on Jun 29 2019, 1:11 AM.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

np created this revision.Jun 29 2019, 1:11 AM
kib added inline comments.Jun 29 2019, 12:00 PM
453 ↗(On Diff #59182)

We traditionally use %ju/cast to uintmax_t for large values.

Also, would it make sense to round instead of truncating ?

np added inline comments.Jun 29 2019, 6:47 PM
453 ↗(On Diff #59182)

Both valid points. But minidumpsys already has a %llu printf with (long long)dumpsize >> 20 and I thought it better to stay consistent with existing code.

kib accepted this revision.Jun 29 2019, 7:19 PM

Anyway, do as you want. Printing any estimation of the size in case of failure is an improvement on its own, even if not perfect.

345 ↗(On Diff #59182)

If you look closer, the formats usage is not consistent, one case uses %llu, another %ju. You may fix %llu case while there.

This revision is now accepted and ready to land.Jun 29 2019, 7:19 PM