Add an enhanced interface for unloading, aka exporting, headers
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Nov 2011 07:37:49 +0000 (09:37 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Nov 2011 09:03:17 +0000 (11:03 +0200)
commit359baa2831dd1850cba3a1cc8d31aebf883a5138
treed3e854b5fb411d7c0d982c1194fb3a8549690c3d
parente83aa4f63817620633f5079064283cc9c3320e3f
Add an enhanced interface for unloading, aka exporting, headers

- Most callers need the size of the blob as well, which the unloader
  internals know perfectly well but the interface doesn't support
  passing it. So callers were forced to make a second call to
  headerSizeof() to recalculate the size. Duh.
- Rename and export doHeaderUnload() as headerExport(), update internal
  callers to use the new name. headerExport() is hopefully a bit
  more obvious as a name than headerUnload() which doesn't actually
  undo the effect of headerLoad() for that header, but merely exports
  the data by serializing into on-disk format.
- Header size is not size_t really, its capped to fixed much lower
  size. Use unsigned int to better match reality.
lib/header.c
lib/header.h