Style: adds Cpp11BracedListStyle: Block

This commit is contained in:
李通洲
2026-03-30 10:27:23 +08:00
committed by Carter Li
parent 5f261702a9
commit 831659966f
189 changed files with 1724 additions and 1733 deletions
+4 -4
View File
@@ -16,7 +16,7 @@ typedef uint16_t efi_char;
#endif
#ifndef EFI_GLOBAL_VARIABLE
# define EFI_GLOBAL_VARIABLE {0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, {0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c}}
# define EFI_GLOBAL_VARIABLE { 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, { 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c } }
#endif
const char* ffDetectBootmgr(FFBootmgrResult* result) {
@@ -32,7 +32,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) {
};
ioc.datasize = sizeof(buffer);
ioc.name = (efi_char[]) {'B', 'o', 'o', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', '\0'};
ioc.name = (efi_char[]) { 'B', 'o', 'o', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', '\0' };
ioc.namesize = sizeof("BootCurrent") * 2;
if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) < 0 || ioc.datasize != 2) {
return "ioctl(EFIIOC_VAR_GET, BootCurrent) failed";
@@ -43,7 +43,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) {
unsigned char hex[5];
snprintf((char*) hex, sizeof(hex), "%04X", result->order);
ioc.datasize = sizeof(buffer);
ioc.name = (efi_char[]) {'B', 'o', 'o', 't', hex[0], hex[1], hex[2], hex[3], '\0'};
ioc.name = (efi_char[]) { 'B', 'o', 'o', 't', hex[0], hex[1], hex[2], hex[3], '\0' };
ioc.namesize = sizeof("Boot####") * 2;
if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) < 0 || ioc.datasize == sizeof(buffer)) {
return "ioctl(EFIIOC_VAR_GET, Boot####) failed";
@@ -51,7 +51,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) {
ffEfiFillLoadOption((FFEfiLoadOption*) buffer, result);
ioc.name = (efi_char[]) {'S', 'e', 'c', 'u', 'r', 'e', 'B', 'o', 'o', 't', '\0'};
ioc.name = (efi_char[]) { 'S', 'e', 'c', 'u', 'r', 'e', 'B', 'o', 'o', 't', '\0' };
ioc.namesize = sizeof("SecureBoot") * 2;
ioc.datasize = sizeof(buffer);
if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) == 0 && ioc.datasize == 1) {
+1 -2
View File
@@ -15,8 +15,7 @@ const char* enablePrivilege(const wchar_t* privilege) {
TOKEN_PRIVILEGES tp = {
.PrivilegeCount = 1,
.Privileges = {
(LUID_AND_ATTRIBUTES) {.Attributes = SE_PRIVILEGE_ENABLED}
},
(LUID_AND_ATTRIBUTES) { .Attributes = SE_PRIVILEGE_ENABLED } },
};
if (!LookupPrivilegeValueW(NULL, privilege, &tp.Privileges[0].Luid)) {
return "LookupPrivilegeValue() failed";