https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f315111bb583b1911d1d90...
commit f315111bb583b1911d1d9069c964ca5d4735ac18 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Thu Jan 9 19:34:56 2025 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Tue Jan 21 19:16:02 2025 +0100
[NTOS:IO] Improve some comments in IoVolumeDeviceToDosName()
Addendum to commit 5afb7ab003. --- ntoskrnl/io/iomgr/volume.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 3f614e27c98..5d5614b4454 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -1328,7 +1328,7 @@ IoVolumeDeviceToDosName( return Status; }
- /* Now, query the MountMgr for the DOS path */ + /* Retrieve the MountMgr controlling device */ RtlInitUnicodeString(&MountMgrDevice, MOUNTMGR_DEVICE_NAME); Status = IoGetDeviceObjectPointer(&MountMgrDevice, FILE_READ_ATTRIBUTES, &FileObject, &DeviceObject); @@ -1337,6 +1337,7 @@ IoVolumeDeviceToDosName( return Status; }
+ /* Now, query the MountMgr for the DOS path */ KeInitializeEvent(&Event, NotificationEvent, FALSE); Irp = IoBuildDeviceIoControlRequest(IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH, DeviceObject, @@ -1362,7 +1363,7 @@ IoVolumeDeviceToDosName( goto Quit; }
- /* Compute the needed size to store the DOS name. + /* Compute the needed size to store the DOS path. * Even if MOUNTMGR_VOLUME_PATHS allows bigger name lengths * than MAXUSHORT, we can't use them, because we have to return * this in an UNICODE_STRING that stores length in a USHORT. */ @@ -1373,8 +1374,8 @@ IoVolumeDeviceToDosName( goto Quit; }
- /* Reallocate the memory, even in case of success, because - * that's the buffer that will be returned to the caller */ + /* Allocate the buffer, even in case of success, + * because it is returned to the caller */ VolumePathPtr = ExAllocatePoolWithTag(PagedPool, Length, TAG_DEV2DOS); if (!VolumePathPtr) {