[flashrom] [PATCH] ioperm+include cleanup

Stefan Reinauer stepan at coresystems.de
Sun Aug 9 16:10:11 CEST 2009


On 8/9/09 4:03 PM, Carl-Daniel Hailfinger wrote:
> Well, this is the same mechanism we use for ft2232_spi.c and back then
> it was picked because it allowed us to avoid lots of ifdefs in generic
> code. We'd need an ifdef in option parsing, an ifdef in the programmer
> struct, an ifdef in the programmer enum, etc. With all those ifdefs, it
> gets easy to miss one. Plus, we'd need to use #ifdef for the flashrom
> usage message, the --list-supported parameter
Which would be a clean way of doing it, otherwise we end up with a list
of programmers in the code that are not at all supported.

> The size benefits of not compiling serprog.c at all are ~256 bytes.
>   
I am not worried about the size but about dead code being compiled into
a mission critical program.

Stefan


-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the flashrom mailing list