fwts: uefirtvariable: Correct DataSize for GetVariable() patch broke building
Matt Fleming
matt.fleming at intel.com
Tue Feb 26 19:10:30 UTC 2013
On Tue, 2013-02-26 at 13:54 -0500, John Brier wrote:
> Hi, I think your latest patch broke the building of fwts:
>
>
> able/uefirtvariable.c' || echo './'`uefi/uefirtvariable/uefirtvariable.c
> uefi/uefirtvariable/uefirtvariable.c: In function ‘getvariable_test’:
> uefi/uefirtvariable/uefirtvariable.c:92: error: expected ‘=’, ‘,’, ‘;’,
> ‘asm’ or ‘__attribute__’ before ‘sizeof’
> cc1: warnings being treated as errors
> uefi/uefirtvariable/uefirtvariable.c:92: error: statement with no effect
> uefi/uefirtvariable/uefirtvariable.c:127: error: ‘getdatasize’
> undeclared (first use in this function)
> uefi/uefirtvariable/uefirtvariable.c:127: error: (Each undeclared
> identifier is reported only once
> uefi/uefirtvariable/uefirtvariable.c:127: error: for each function it
> appears in.)
> make[3]: *** [uefirtvariable.o] Error 1
> make[3]: Leaving directory `/root/fwts/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/fwts/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/fwts'
> make: *** [all] Error 2
> [root at intel-s3eb1-01 fwts]# git log .
> commit 812f86e02c3563bdcbf7a4f19fa4fb01d6aa6dda
> Author: Matt Fleming <matt.fleming at intel.com>
> Date: Fri Feb 22 07:08:16 2013 +0000
>
> uefirtvariable: Correct DataSize for GetVariable()
>
> When calling GetVariable(), we need to fill out DataSize with the size
> of the Data buffer instead of using whatever garbage value is left on
> the stack.
>
> Furthermore, the Data buffers are not strings in any of the tests, so
> there's no need to NUL-terminate them or make them 1-byte larger than
> datasize, e.g. there's no real need to do this,
>
> uint8_t data[datasize+1];
>
> since the last element of data[] is never read back anyway.
>
> Cc: Ivan Hu <ivan.hu at canonical.com>
> Cc: Colin Ian King <colin.king at canonical.com>
> Cc: Alex Hung <alex.hung at canonical.com>
> Signed-off-by: Matt Fleming <matt.fleming at intel.com>
> Acked-by: Colin Ian King <colin.king at canonical.com>
> Acked-by: Alex Hung <alex.hung at canonical.com>
> Acked-by: Ivan Hu <ivan.hu at canonical.com>
>
Hmm.. you're right, this commit in the fwts repository is broken - it's
missing a '=' on line 92. But the patch I mailed out wasn't broken like
this, and in fact, included a lot more hunks than is in the above
commit.
Did someone hand apply this patch?
More information about the fwts-devel
mailing list