mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
[NTOS:IO] IoVolumeDeviceToDosName(): Add SAL2 annotations, fix pool tag (#6989)
The DEV2DOS tag value is from the official Windows pooltag.txt file.
This commit is contained in:
parent
5afb7ab003
commit
e4748fe448
2 changed files with 7 additions and 4 deletions
|
@ -94,6 +94,7 @@
|
|||
#define TAG_VPB ' BPV'
|
||||
#define TAG_RTLREGISTRY 'vrqR'
|
||||
#define TAG_PNP_DEVACTION 'aDpP'
|
||||
#define TAG_DEV2DOS ' d2D'
|
||||
|
||||
/* Loader Related Tags */
|
||||
#define TAG_MODULE_OBJECT 'omlk' /* klmo - kernel ldr module object */
|
||||
|
|
|
@ -1276,8 +1276,10 @@ IoSetSystemPartition(IN PUNICODE_STRING VolumeNameString)
|
|||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
IoVolumeDeviceToDosName(IN PVOID VolumeDeviceObject,
|
||||
OUT PUNICODE_STRING DosName)
|
||||
IoVolumeDeviceToDosName(
|
||||
_In_ PVOID VolumeDeviceObject,
|
||||
_Out_ _When_(return==0, _At_(DosName->Buffer, __drv_allocatesMem(Mem)))
|
||||
PUNICODE_STRING DosName)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG Length;
|
||||
|
@ -1373,7 +1375,7 @@ IoVolumeDeviceToDosName(IN PVOID VolumeDeviceObject,
|
|||
|
||||
/* Reallocate the memory, even in case of success, because
|
||||
* that's the buffer that will be returned to the caller */
|
||||
VolumePathPtr = ExAllocatePoolWithTag(PagedPool, Length, 'D2d ');
|
||||
VolumePathPtr = ExAllocatePoolWithTag(PagedPool, Length, TAG_DEV2DOS);
|
||||
if (!VolumePathPtr)
|
||||
{
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
@ -1418,7 +1420,7 @@ IoVolumeDeviceToDosName(IN PVOID VolumeDeviceObject,
|
|||
goto Quit;
|
||||
|
||||
ReleaseMemory:
|
||||
ExFreePoolWithTag(VolumePathPtr, 'D2d ');
|
||||
ExFreePoolWithTag(VolumePathPtr, TAG_DEV2DOS);
|
||||
|
||||
Quit:
|
||||
ObDereferenceObject(FileObject);
|
||||
|
|
Loading…
Reference in a new issue