[PATCH 4/5] mountmgr.sys: Add the ability to query filesystem attributes on a file handle.
Alexandre Julliard
julliard at winehq.org
Wed Mar 24 11:58:55 CDT 2021
"Zebediah Figura (she/her)" <zfigura at codeweavers.com> writes:
> On 3/18/21 11:54 AM, Erich E. Hoover wrote:
>> @@ -2019,6 +2057,30 @@ NTSTATUS query_volume( void *buff, SIZE_T insize, SIZE_T outsize, IO_STATUS_BLOC
>> }
>> LeaveCriticalSection( &device_section );
>> + if (!volume && input->info_class ==
>> FileFsAttributeInformation)
>> + {
>> + enum fs_type fs_type = FS_UNKNOWN;
>> + HANDLE hProcess, handle;
>> + BOOL ret;
>> + int fd;
>> +
>> + if (!(hProcess = OpenProcess( PROCESS_DUP_HANDLE, FALSE, input->process )))
>> + return status;
>
> This is right, but it looks wrong. I'd recommend returning early in
> the if (volume) block, and explicitly returning STATUS_NO_SUCH_DEVICE
> instead of initializing it at the top.
Actually I don't think mountmgr has any business resolving client
handles itself. There has to be a better way.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list