diff options
author | marcel <marcel@FreeBSD.org> | 2005-07-02 19:57:31 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-07-02 19:57:31 +0000 |
commit | 696ddfbe750f1c4366a789f2a656f2ff955fd9d8 (patch) | |
tree | 54f288ba00f0486eda48adc26388a6786131a6ae /sys/conf | |
parent | 23daa51ff3afaa00ae1e82f8212d7e49dd190349 (diff) | |
download | FreeBSD-src-696ddfbe750f1c4366a789f2a656f2ff955fd9d8.zip FreeBSD-src-696ddfbe750f1c4366a789f2a656f2ff955fd9d8.tar.gz |
Fix a buglet that was present in the ia64 code and that got inherited
by amd64 and i386: For buffered writes we collect data and write it
out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
to keep track of how much data we have collected in the buffer so far
and it's reset to zero immediately after writing a block to the dump
device.
When the last, possibly partially filled buffer is flushed, we didn't
reset fragsz to 0 and as such would stop reflecting reality. Since we
currently only need to do buffered writes once, this isn't a problem.
However, when kernel dumps are made by hand (say by callling doadump
from within DDB), the improperly cleared state from the first call to
dumpsys causes the next call to dumpsys to create an invalid code file.
This change resets fragsz after flushing the partially filled buffer so
that it fixes the two problems at once.
Approved by: re (scottl)
Diffstat (limited to 'sys/conf')
0 files changed, 0 insertions, 0 deletions