A windows utility to detect when booted from EFI
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10595 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
6e4a81262d
commit
816f80af00
19
xCAT-server/share/xcat/netboot/windows/detectefi.cpp
Executable file
19
xCAT-server/share/xcat/netboot/windows/detectefi.cpp
Executable file
@ -0,0 +1,19 @@
|
||||
/* Compile this with cl.exe from MS SDK, e.g. 'cl efidetect.cpp', that is all. */
|
||||
/* IBM(c) 2011 EPL license http://www.eclipse.org/legal/epl-v10.html */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
GetFirmwareEnvironmentVariableA("","{00000000-0000-0000-0000-000000000000}",NULL,0);
|
||||
if (GetLastError() == ERROR_INVALID_FUNCTION) { // This.. is.. LEGACY BIOOOOOOOOS....
|
||||
printf("Legacy");
|
||||
return 1;
|
||||
} else {
|
||||
printf("UEFI");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
BIN
xCAT-server/share/xcat/netboot/windows/detectefi.exe
Executable file
BIN
xCAT-server/share/xcat/netboot/windows/detectefi.exe
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user