You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
* Sync BaseTools to align with edk2-stable202311 Keep the SBL specific change (e.g. Lz4). Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Sync MdePkg from EDK2 edk2-stable202311 branch Only sync required file without any changes to EDK2 files. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Update MdePkg for SBL after sync from EDK2 Signed-off-by: Guo Dong <guo.dong@intel.com> * Update SBL after updating Basetool and MdePkg After Sync BaseTool and MdePkg to edk2-stable202311, Need update SBL code to align with this change. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: rollback some changes after mdepkg sync New change from MdePkg requires new NASM version. To make sure NASM 2.14.02 still works, just rollback few changes. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Update component size to fix build failure After syncing BaseTool and MdePkg, some components would have a little bigger size. So update the config to fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Remove unused asl code Some ASL files don't exist but they are included in other asl files. It would cause build failure with new build BaseTool. So just remove them to fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com> --------- Signed-off-by: Guo Dong <guo.dong@intel.com>
98 lines
2.0 KiB
C
98 lines
2.0 KiB
C
/** @file
|
|
Header file for helper functions useful to operate file directories by parsing
|
|
file path.
|
|
|
|
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef _EFI_OS_PATH_H
|
|
#define _EFI_OS_PATH_H
|
|
|
|
#include <Common/UefiBaseTypes.h>
|
|
|
|
//
|
|
// Functions declarations
|
|
//
|
|
|
|
/**
|
|
This function returns the directory path which contains the particular path.
|
|
Some examples:
|
|
"a/b/c" -> "a/b"
|
|
"a/b/c/" -> "a/b"
|
|
"a" -> "."
|
|
"." -> ".."
|
|
"/" -> NULL
|
|
|
|
This function does not check for the existence of the file.
|
|
|
|
The caller must free the string returned.
|
|
|
|
@param FilePath Path name of file to get the parent directory for.
|
|
|
|
@return NULL if error
|
|
**/
|
|
CHAR8*
|
|
OsPathDirName (
|
|
IN CHAR8 *FilePath
|
|
)
|
|
;
|
|
|
|
/**
|
|
This function returns the directory path which contains the particular path.
|
|
Some examples:
|
|
"a/b/../c" -> "a/c"
|
|
"a/b//c" -> "a/b/c"
|
|
"a/./b" -> "a/b"
|
|
|
|
This function does not check for the existence of the file.
|
|
|
|
@param Path Path name of file to normalize
|
|
|
|
@return The string is altered in place.
|
|
**/
|
|
VOID
|
|
OsPathNormPathInPlace (
|
|
IN CHAR8 *Path
|
|
)
|
|
;
|
|
|
|
/**
|
|
This function replaces the final portion of a path with an alternative
|
|
'peer' filename. For example:
|
|
"a/b/../c", "peer" -> "a/b/../peer"
|
|
"a/b/", "peer" -> "a/b/peer"
|
|
"/a", "peer" -> "/peer"
|
|
"a", "peer" -> "peer"
|
|
|
|
This function does not check for the existence of the file.
|
|
|
|
@param OldPath Path name of replace the final segment
|
|
@param Peer The new path name to concatenate to become the peer path
|
|
|
|
@return A CHAR8* string, which must be freed by the caller
|
|
**/
|
|
CHAR8*
|
|
OsPathPeerFilePath (
|
|
IN CHAR8 *OldPath,
|
|
IN CHAR8 *Peer
|
|
)
|
|
;
|
|
|
|
/**
|
|
Checks if a file exists
|
|
|
|
@param InputFileName The name of the file to check for existence
|
|
|
|
@retval TRUE The file exists
|
|
@retval FALSE The file does not exist
|
|
**/
|
|
BOOLEAN
|
|
OsPathExists (
|
|
IN CHAR8 *InputFileName
|
|
)
|
|
;
|
|
|
|
#endif
|