зеркало из https://github.com/microsoft/lsvmtools.git
Removed unused sources.
This commit is contained in:
Родитель
7634e2e829
Коммит
c396cbd297
|
@ -21,7 +21,6 @@ CFLAGS += -Wall -Os $(EFI_CFLAGS) -Werror
|
|||
|
||||
SOURCES += bootfs.c
|
||||
SOURCES += cert.c
|
||||
#SOURCES += faults.c
|
||||
SOURCES += globals.c
|
||||
SOURCES += image.c
|
||||
SOURCES += loadconf.c
|
||||
|
@ -31,7 +30,6 @@ SOURCES += logo.c
|
|||
SOURCES += main.c
|
||||
SOURCES += measure.c
|
||||
SOURCES += paths.c
|
||||
#SOURCES += sleep.c
|
||||
SOURCES += stubs.c
|
||||
SOURCES += luksbio.c
|
||||
SOURCES += bootbio.c
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** LSVMTools
|
||||
**
|
||||
** MIT License
|
||||
**
|
||||
** Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and associated documentation files (the "Software"), to deal
|
||||
** in the Software without restriction, including without limitation the rights
|
||||
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
** copies of the Software, and to permit persons to whom the Software is
|
||||
** furnished to do so, subject to the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included in
|
||||
** all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
** SOFTWARE
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <lsvmutils/strarr.h>
|
||||
#include <lsvmutils/strings.h>
|
||||
#include "log.h"
|
||||
#include "faults.h"
|
||||
|
||||
#if defined(ENABLE_FAULTS)
|
||||
|
||||
static StrArr _names = STRARR_INITIALIZER;
|
||||
|
||||
BOOLEAN CheckFault(const char* name)
|
||||
{
|
||||
if (StrArrFind(&_names, name) == (UINTN)-1)
|
||||
return FALSE;
|
||||
|
||||
LOGE(L"faulted: %a", Str(name));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int AppendFault(const char* name)
|
||||
{
|
||||
if (StrArrFind(&_names, name) != (UINTN)-1)
|
||||
return -1;
|
||||
|
||||
return StrArrAppend(&_names, (char*)name);
|
||||
}
|
||||
|
||||
#endif /* defined(ENABLE_FAULTS) */
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** LSVMTools
|
||||
**
|
||||
** MIT License
|
||||
**
|
||||
** Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and associated documentation files (the "Software"), to deal
|
||||
** in the Software without restriction, including without limitation the rights
|
||||
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
** copies of the Software, and to permit persons to whom the Software is
|
||||
** furnished to do so, subject to the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included in
|
||||
** all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
** SOFTWARE
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
#ifndef _faults_h
|
||||
#define _faults_h
|
||||
|
||||
#include "config.h"
|
||||
#include <lsvmutils/eficommon.h>
|
||||
#include <lsvmutils/inline.h>
|
||||
|
||||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** defined(ENABLE_FAULTS)
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
|
||||
#if defined(ENABLE_FAULTS)
|
||||
|
||||
BOOLEAN CheckFault(const char* name);
|
||||
|
||||
int AppendFault(const char* name);
|
||||
|
||||
#endif /* defined(ENABLE_FAULTS) */
|
||||
|
||||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** !defined(ENABLE_FAULTS)
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
|
||||
#if !defined(ENABLE_FAULTS)
|
||||
|
||||
INLINE BOOLEAN CheckFault(const char* name)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
INLINE int AppendFault(const char* name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !defined(ENABLE_FAULTS) */
|
||||
|
||||
#endif /* _faults_h */
|
|
@ -35,7 +35,6 @@
|
|||
#include <lsvmutils/strings.h>
|
||||
#include "paths.h"
|
||||
#include "log.h"
|
||||
#include "faults.h"
|
||||
#include "loadconf.h"
|
||||
|
||||
static int _confCallback(
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "paths.h"
|
||||
#include "console.h"
|
||||
#include "simpletext.h"
|
||||
#include "faults.h"
|
||||
#include "logging.h"
|
||||
#include "globals.h"
|
||||
#include "bootfs.h"
|
||||
|
@ -245,8 +244,7 @@ EFI_STATUS Initialize(
|
|||
ClearErr(err);
|
||||
|
||||
/* Check to see if expected files are in place */
|
||||
if (_CheckFileDependencies(imageHandle) != EFI_SUCCESS ||
|
||||
CheckFault("FILE_DEPENDENCY_CHECKS_FAILED"))
|
||||
if (_CheckFileDependencies(imageHandle) != EFI_SUCCESS)
|
||||
{
|
||||
status = EFI_LOAD_ERROR;
|
||||
SetErr(err, L"file dependency checks failed");
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** LSVMTools
|
||||
**
|
||||
** MIT License
|
||||
**
|
||||
** Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and associated documentation files (the "Software"), to deal
|
||||
** in the Software without restriction, including without limitation the rights
|
||||
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
** copies of the Software, and to permit persons to whom the Software is
|
||||
** furnished to do so, subject to the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included in
|
||||
** all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
** SOFTWARE
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "sleep.h"
|
||||
|
||||
EFI_STATUS Sleep(const UINT64 seconds)
|
||||
{
|
||||
EFI_STATUS status = EFI_SUCCESS;
|
||||
EFI_EVENT event = NULL;
|
||||
UINTN index = 0;
|
||||
|
||||
/* Create an EVT_TIMER event */
|
||||
if ((status = BS->CreateEvent(
|
||||
EVT_TIMER,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
&event)) != EFI_SUCCESS)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Set the timer to go off once */
|
||||
if ((status = BS->SetTimer(
|
||||
event,
|
||||
TimerPeriodic,
|
||||
10000000 * seconds)) != EFI_SUCCESS)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Wait for the timer event */
|
||||
if ((status = BS->WaitForEvent(1, &event, &index)) != EFI_SUCCESS)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (event)
|
||||
BS->CloseEvent(event);
|
||||
|
||||
return status;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** LSVMTools
|
||||
**
|
||||
** MIT License
|
||||
**
|
||||
** Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and associated documentation files (the "Software"), to deal
|
||||
** in the Software without restriction, including without limitation the rights
|
||||
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
** copies of the Software, and to permit persons to whom the Software is
|
||||
** furnished to do so, subject to the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included in
|
||||
** all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
** SOFTWARE
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
#ifndef _sleep_h
|
||||
#define _sleep_h
|
||||
|
||||
#include "config.h"
|
||||
#include <lsvmutils/eficommon.h>
|
||||
|
||||
EFI_STATUS Sleep(const UINT64 seconds);
|
||||
|
||||
#endif /* _sleep_h */
|
Загрузка…
Ссылка в новой задаче