Get rid of BlEfiDirectorySeparator() routine and allow GetVolumeDevicePath() to store ARC name
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
c09b121178
commit
b29162841c
@ -162,38 +162,6 @@ BlDbgPrint(IN PUINT16 Format,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces slashes (/) with backslashes (\) in the string containing on-disk path.
|
|
||||||
*
|
|
||||||
* @param Path
|
|
||||||
* A pointer to the string containing an original system path.
|
|
||||||
*
|
|
||||||
* @return A pointer to converted string with EFI supported path separators.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
PWCHAR
|
|
||||||
BlEfiDirectorySeparator(IN PWCHAR Path)
|
|
||||||
{
|
|
||||||
PWCHAR EfiPath = NULL;
|
|
||||||
|
|
||||||
while(*Path)
|
|
||||||
{
|
|
||||||
if(*Path == '/')
|
|
||||||
{
|
|
||||||
*EfiPath = '\\';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*EfiPath = *Path;
|
|
||||||
}
|
|
||||||
Path++;
|
|
||||||
EfiPath++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EfiPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This routine allocates a pool memory.
|
* This routine allocates a pool memory.
|
||||||
*
|
*
|
||||||
|
@ -51,9 +51,6 @@ VOID
|
|||||||
BlDbgPrint(IN PUINT16 Format,
|
BlDbgPrint(IN PUINT16 Format,
|
||||||
IN ...);
|
IN ...);
|
||||||
|
|
||||||
PWCHAR
|
|
||||||
BlEfiDirectorySeparator(IN PWCHAR Path);
|
|
||||||
|
|
||||||
INT_PTR
|
INT_PTR
|
||||||
BlEfiGetSecureBootStatus();
|
BlEfiGetSecureBootStatus();
|
||||||
|
|
||||||
@ -83,6 +80,7 @@ BlFindVolumeDevicePath(IN PEFI_DEVICE_PATH_PROTOCOL FsHandle,
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlGetVolumeDevicePath(IN PUCHAR SystemPath,
|
BlGetVolumeDevicePath(IN PUCHAR SystemPath,
|
||||||
OUT PEFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
OUT PEFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||||
|
OUT PUCHAR *ArcName,
|
||||||
OUT PUCHAR *Path);
|
OUT PUCHAR *Path);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -114,6 +112,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices);
|
|||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlpDissectVolumeArcPath(IN PUCHAR SystemPath,
|
BlpDissectVolumeArcPath(IN PUCHAR SystemPath,
|
||||||
|
OUT PUCHAR *ArcName,
|
||||||
OUT PUCHAR *Path,
|
OUT PUCHAR *Path,
|
||||||
OUT PUSHORT DriveType,
|
OUT PUSHORT DriveType,
|
||||||
OUT PULONG DriveNumber,
|
OUT PULONG DriveNumber,
|
||||||
|
@ -295,6 +295,7 @@ BlFindVolumeDevicePath(IN PEFI_DEVICE_PATH_PROTOCOL FsHandle,
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlGetVolumeDevicePath(IN PUCHAR SystemPath,
|
BlGetVolumeDevicePath(IN PUCHAR SystemPath,
|
||||||
OUT PEFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
OUT PEFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||||
|
OUT PUCHAR *ArcName,
|
||||||
OUT PUCHAR *Path)
|
OUT PUCHAR *Path)
|
||||||
{
|
{
|
||||||
PEFI_BLOCK_DEVICE Device;
|
PEFI_BLOCK_DEVICE Device;
|
||||||
@ -349,7 +350,7 @@ BlGetVolumeDevicePath(IN PUCHAR SystemPath,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Defaults to ARC path, dissect it */
|
/* Defaults to ARC path, dissect it */
|
||||||
Status = BlpDissectVolumeArcPath(SystemPath, Path, &DriveType, &DriveNumber, &PartNumber);
|
Status = BlpDissectVolumeArcPath(SystemPath, ArcName, Path, &DriveType, &DriveNumber, &PartNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if volume path parsed successfully */
|
/* Check if volume path parsed successfully */
|
||||||
@ -582,6 +583,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices)
|
|||||||
*/
|
*/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlpDissectVolumeArcPath(IN PUCHAR SystemPath,
|
BlpDissectVolumeArcPath(IN PUCHAR SystemPath,
|
||||||
|
OUT PUCHAR *ArcName,
|
||||||
OUT PUCHAR *Path,
|
OUT PUCHAR *Path,
|
||||||
OUT PUSHORT DriveType,
|
OUT PUSHORT DriveType,
|
||||||
OUT PULONG DriveNumber,
|
OUT PULONG DriveNumber,
|
||||||
@ -711,6 +713,11 @@ BlpDissectVolumeArcPath(IN PUCHAR SystemPath,
|
|||||||
*Path = SystemPath + ArcLength;
|
*Path = SystemPath + ArcLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ArcName)
|
||||||
|
{
|
||||||
|
/* TODO: Store ARC path in ArcName */
|
||||||
|
}
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
return STATUS_EFI_SUCCESS;
|
return STATUS_EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user