Rework BlEfiDirectorySeparator(), now it operates on wide strings
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Rafal Kupiec 2022-10-26 22:11:42 +02:00
parent 30bc0c3cb7
commit c09b121178
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 17 additions and 8 deletions

View File

@ -163,26 +163,35 @@ BlDbgPrint(IN PUINT16 Format,
}
/**
* Replaces slashes (/) with backslashes (\) in the input string.
* Replaces slashes (/) with backslashes (\) in the string containing on-disk path.
*
* @param Path
* A pointer to the string containing a system path, where directory separator will get replaced.
* A pointer to the string containing an original system path.
*
* @return This routine does not return any value.
* @return A pointer to converted string with EFI supported path separators.
*
* @since XT 1.0
*/
VOID
BlEfiDirectorySeparator(IN OUT PUCHAR Path)
PWCHAR
BlEfiDirectorySeparator(IN PWCHAR Path)
{
PWCHAR EfiPath = NULL;
while(*Path)
{
if(*Path == '/')
{
*Path = '\\';
*EfiPath = '\\';
}
else
{
*EfiPath = *Path;
}
Path++;
EfiPath++;
}
return EfiPath;
}
/**

View File

@ -51,8 +51,8 @@ VOID
BlDbgPrint(IN PUINT16 Format,
IN ...);
VOID
BlEfiDirectorySeparator(IN OUT PUCHAR Path);
PWCHAR
BlEfiDirectorySeparator(IN PWCHAR Path);
INT_PTR
BlEfiGetSecureBootStatus();