[flashrom] [RFC] Add struct flashchip * everywhere

Michael Karcher flashrom at mkarcher.dialup.fu-berlin.de
Wed Dec 14 19:07:28 CET 2011


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!

> 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>

> +	/* 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?

Regards,
  Michael Karcher





More information about the flashrom mailing list