gcc complained about the impossibility of the test nw < 0 in
DoRegularFile where nw is unsigned. Looking further, this was
preventing code from logging an error writing to the output file while
decompressing.
Details
Details
Tested by doing a zstd dump and then trying to savecore -u it to a
too-small tmpfs fs. Before this patch, savecore "succeeds" (exits 0)
but leaves a truncated core file. After this patch, savecore fails
(exits 1).
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Should we also add an fflush/fsync? We are now successfully failing--because we get an error early enough, but that is not guaranteed. Waiting for savecore to fsync could slow it down slightly, but that seems okay, given how rare this usually is.