e.g. savecore -L /var/crash
savecore(8) will invoke the livedump via ioctl on /dev/mem, and verify
the resulting core file. In the panic dump case we read the dump headers
and optional encryption key off of the dump device, then finally copy
the contents to a new core file. For the livedump we operate on the core
file itself, truncating the dump header and shifting the dump contents
to the beginning of the file if necessary.
Still a couple of TODO items, but putting this up for review now.
- code cleanups, check error handling paths
- find a better way to handle the temporary file/rename
- update man page
- test the !livecore case and make sure things aren't broken