forked from xt-sys/exectos
Rework BlEfiDirectorySeparator(), now it operates on wide strings
This commit is contained in:
parent
30bc0c3cb7
commit
c09b121178
@ -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
|
* @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
|
* @since XT 1.0
|
||||||
*/
|
*/
|
||||||
VOID
|
PWCHAR
|
||||||
BlEfiDirectorySeparator(IN OUT PUCHAR Path)
|
BlEfiDirectorySeparator(IN PWCHAR Path)
|
||||||
{
|
{
|
||||||
|
PWCHAR EfiPath = NULL;
|
||||||
|
|
||||||
while(*Path)
|
while(*Path)
|
||||||
{
|
{
|
||||||
if(*Path == '/')
|
if(*Path == '/')
|
||||||
{
|
{
|
||||||
*Path = '\\';
|
*EfiPath = '\\';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*EfiPath = *Path;
|
||||||
}
|
}
|
||||||
Path++;
|
Path++;
|
||||||
|
EfiPath++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return EfiPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,8 @@ VOID
|
|||||||
BlDbgPrint(IN PUINT16 Format,
|
BlDbgPrint(IN PUINT16 Format,
|
||||||
IN ...);
|
IN ...);
|
||||||
|
|
||||||
VOID
|
PWCHAR
|
||||||
BlEfiDirectorySeparator(IN OUT PUCHAR Path);
|
BlEfiDirectorySeparator(IN PWCHAR Path);
|
||||||
|
|
||||||
INT_PTR
|
INT_PTR
|
||||||
BlEfiGetSecureBootStatus();
|
BlEfiGetSecureBootStatus();
|
||||||
|
Loading…
Reference in New Issue
Block a user