Am 14.12.2011 19:07 schrieb Michael Karcher:
Am Freitag, den 09.12.2011, 02:19 +0100 schrieb Carl-Daniel Hailfinger:
New version, updated to apply against svn HEAD. Please note that this one still duplicates the struct flashchip members manually in struct flashctx. An alternative version will be posted as followup.
Thanks for your tedious work on that!
Thanks for the review!
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Thanks, committed in r1473.
- /* Check that virtual_memory in struct flashctx is placed directly
* after the members copied from struct flashchip.
*/
- if (sizeof(struct flashchip) != offsetof(struct flashctx, virtual_memory)) {
msg_gerr("struct flashctx broken!\n");
ret = 1;
- }
There is no "offsetof" in C90, its a common C99 extension. Do we care?
Given that clang, gcc and MSVC in all variants support it (and some C90 draft mentions it), I don't really worry about that.
Regards, Carl-Daniel