[flashrom] [PATCH] Fix flashrom -L

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Oct 7 01:50:45 CEST 2010


On 07.10.2010 00:12, Uwe Hermann wrote:
> On Wed, Oct 06, 2010 at 02:00:35PM +0200, Carl-Daniel Hailfinger wrote:
>   
>> flashrom -L output did not contain a list of programmers nor were all
>> programmers listed.
>> Fix it.
>> (Well, mostly. Some programmers have no devices listed. And formatting
>> on 80 column screens is totally broken for the flash chip list.)
>> Wiki output is unchanged, and will need separate fixups.
>>
>> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
>>     
>
> Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
>
> But:
>
> flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode
> flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code
> make: *** [flashrom.o] Error 1
>   

Ah right. Changed because requiring C99 mode causes complaints all over
the map in other files.

Thanks for the review, committed in r1199.


> I think this is the culprit:
>
>   for (int i = 0; i < startcol; i++)
>           printf(" ");
>
> Moving the "int i;" to the top of the function should fix it.
>
> However, I also think we should change the printing after 0.9.3 to fit
> into 80 chars/line again. Names like "W29C010(M)/W29C011A/W29EE011/W29EE012"
> make it very hard though, we should shorten them.
>   

One option is to split up such long names into multiple lines, perhaps
at the / boundary.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list