diff options
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efivars.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 47408e802ab6..d10c9873dd9a 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -435,12 +435,23 @@ efivar_attr_read(struct efivar_entry *entry, char *buf) | |||
435 | if (status != EFI_SUCCESS) | 435 | if (status != EFI_SUCCESS) |
436 | return -EIO; | 436 | return -EIO; |
437 | 437 | ||
438 | if (var->Attributes & 0x1) | 438 | if (var->Attributes & EFI_VARIABLE_NON_VOLATILE) |
439 | str += sprintf(str, "EFI_VARIABLE_NON_VOLATILE\n"); | 439 | str += sprintf(str, "EFI_VARIABLE_NON_VOLATILE\n"); |
440 | if (var->Attributes & 0x2) | 440 | if (var->Attributes & EFI_VARIABLE_BOOTSERVICE_ACCESS) |
441 | str += sprintf(str, "EFI_VARIABLE_BOOTSERVICE_ACCESS\n"); | 441 | str += sprintf(str, "EFI_VARIABLE_BOOTSERVICE_ACCESS\n"); |
442 | if (var->Attributes & 0x4) | 442 | if (var->Attributes & EFI_VARIABLE_RUNTIME_ACCESS) |
443 | str += sprintf(str, "EFI_VARIABLE_RUNTIME_ACCESS\n"); | 443 | str += sprintf(str, "EFI_VARIABLE_RUNTIME_ACCESS\n"); |
444 | if (var->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) | ||
445 | str += sprintf(str, "EFI_VARIABLE_HARDWARE_ERROR_RECORD\n"); | ||
446 | if (var->Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) | ||
447 | str += sprintf(str, | ||
448 | "EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\n"); | ||
449 | if (var->Attributes & | ||
450 | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) | ||
451 | str += sprintf(str, | ||
452 | "EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\n"); | ||
453 | if (var->Attributes & EFI_VARIABLE_APPEND_WRITE) | ||
454 | str += sprintf(str, "EFI_VARIABLE_APPEND_WRITE\n"); | ||
444 | return str - buf; | 455 | return str - buf; |
445 | } | 456 | } |
446 | 457 | ||