[PATCH] kernel32: Add support for detecting volume information with libudev.

Alexandre Julliard julliard at winehq.org
Fri Jul 28 01:36:17 CDT 2017


Zebediah Figura <z.figura12 at gmail.com> writes:

> On 07/25/2017 05:33 AM, Alexandre Julliard wrote:
>> Zebediah Figura <z.figura12 at gmail.com> writes:
>>
>>> Using GetVolumeInformation may fail due to lack of permissions; e.g.
>>> when the drive was mounted as root. This patch uses libudev, if it
>>> is available, to retrieve the volume label, serial number, and type.
>>>
>>> Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
>>> ---
>>>   dlls/kernel32/Makefile.in |  3 +-
>>>   dlls/kernel32/volume.c    | 88 +++++++++++++++++++++++++++++++++++++++++++++++
>>>   2 files changed, 90 insertions(+), 1 deletion(-)
>>
>> libudev should be loaded dynamically, and that sort of thing should
>> ideally be done in mountmgr.
>>
>
> Should I move any existing code from GetVolumeInformation() into
> mountmgr.sys? What are the responsibilities of each module in this
> respect?

Yes, kernel32 is not supposed to contain any of that code. It should
only contain the NtQueryVolumeInformationFile part, and ntdll in turn
should do an ioctl or similar call to mountmgr to get the information.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list