[PATCH 1/3] securebootcert: add Ubuntu UEFI secure boot tests

IvanHu ivan.hu at canonical.com
Tue Mar 5 03:15:51 UTC 2013


>> +
>> +static char *securebootcert_attribute(uint32_t attr)
>> +{
>> +    static char str[100];
>> +
>> +    *str = 0;
>> +
>> +    if (attr & FWTS_UEFI_VAR_NON_VOLATILE)
>> +        strcat(str, "NonVolatile");
>> +
>> +    if (attr & FWTS_UEFI_VAR_BOOTSERVICE_ACCESS) {
>> +        if (*str)
>> +            strcat(str, ",");
>> +        strcat(str, "BootServ");
>> +    }
>> +
>> +    if (attr & FWTS_UEFI_VAR_RUNTIME_ACCESS) {
>> +        if (*str)
>> +            strcat(str, ",");
>> +        strcat(str, "RunTime");
>> +    }
>> +
>> +    return str;
>> +}
>> +
>
> This looks almost identical to uefidump_attribute() in
> src/uefi/uefidump/uefidump.c, perhaps we should factor this out into the
> fwts lib in src/lib/src/fwts_uefi.csince we're now duplicating code. Can
> you do that as another set of patches?

I've sent a patch to do that
[ Patch ] lib: fwts_uefi: add a helper fuction to convert attribute into 
readable form
Thanks!

Ivan




More information about the fwts-devel mailing list