mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 20:48:48 +01:00
0849c914a7
Define a dedicated OnDiskData structure for each on-disk structure. This must match the on-disk layout, except for endianness, which is handled by _SwapEndian methods. These structure are "plain old data" so we can use offsetof on them. They are wrapped in an easier to use C++ API. This resolves a lot of problems with the previous code: warnings caused by the use of offsetof as well as a much simpler instanciation of the objects from on-disk data. Also fixed another problem with UUIDs, where the UUIDs were handled by pointers in a lot of place where it was not necessary. Use references instead. The V4 structures which don't have an UUID will return a "null" (zero-filled) one. Change-Id: Ifb2bf6ab94906ca50410dd3446d3566615392ca2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6021 Reviewed-by: Raghav Sharma <raghavself28@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> |
||
---|---|---|
.. | ||
config_headers | ||
jam | ||
scripts |