[flashrom] [RFC] Add struct flashchip * everywhere
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Wed Dec 14 23:27:02 CET 2011
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 at gmx.net>
> Acked-by: Michael Karcher <flashrom at 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
--
http://www.hailfinger.org/
More information about the flashrom
mailing list