From 9035f66c68a52e15851a352016fe6ff47a9d9a54 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 14 Feb 2022 09:28:14 +0100 Subject: [PATCH] mountmgr.sys: Enable compilation with long types. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/mountmgr.sys/Makefile.in | 1 - dlls/mountmgr.sys/dbus.c | 6 +++--- dlls/mountmgr.sys/device.c | 18 +++++++++--------- dlls/mountmgr.sys/mountmgr.c | 8 ++++---- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/dlls/mountmgr.sys/Makefile.in b/dlls/mountmgr.sys/Makefile.in index 66918d3a750..612ac71f869 100644 --- a/dlls/mountmgr.sys/Makefile.in +++ b/dlls/mountmgr.sys/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = mountmgr.sys UNIXLIB = mountmgr.so IMPORTS = uuid advapi32 ntoskrnl diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index 70b2f0c1592..81c9f89d246 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -753,7 +753,7 @@ static DBusMessage *dhcp4_config_option_request( const char *unix_name, const ch return reply; } -static const char *map_option( ULONG option ) +static const char *map_option( unsigned option ) { switch (option) { @@ -792,7 +792,7 @@ NTSTATUS dhcp_request( void *args ) ptr->S_un.S_addr = inet_addr( value ); params->req->offset = params->offset; params->req->size = sizeof(*ptr); - TRACE( "returning %08x\n", *(DWORD *)ptr ); + TRACE( "returning %08x\n", *(unsigned int*)ptr ); } ret = sizeof(*ptr); break; @@ -814,7 +814,7 @@ NTSTATUS dhcp_request( void *args ) break; } default: - FIXME( "option %u not supported\n", params->req->id ); + FIXME( "option %u not supported\n", (unsigned int)params->req->id ); break; } diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index b8a0040195d..50b2f38bbd8 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -717,7 +717,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device ** } else { - FIXME( "IoCreateDevice %s got %x\n", debugstr_w(name.Buffer), status ); + FIXME( "IoCreateDevice %s got %lx\n", debugstr_w(name.Buffer), status ); RtlFreeUnicodeString( &name ); } return status; @@ -890,7 +890,7 @@ static BOOL get_volume_device_info( struct volume *volume ) if (!(name = wine_get_dos_file_name( unix_device ))) { - ERR("Failed to convert %s to NT, err %u\n", debugstr_a(unix_device), GetLastError()); + ERR("Failed to convert %s to NT, err %lu\n", debugstr_a(unix_device), GetLastError()); return FALSE; } handle = CreateFileW( name, GENERIC_READ | SYNCHRONIZE, FILE_SHARE_READ | FILE_SHARE_WRITE, @@ -898,7 +898,7 @@ static BOOL get_volume_device_info( struct volume *volume ) RtlFreeHeap( GetProcessHeap(), 0, name ); if (handle == INVALID_HANDLE_VALUE) { - WARN("Failed to open %s, err %u\n", debugstr_a(unix_device), GetLastError()); + WARN("Failed to open %s, err %lu\n", debugstr_a(unix_device), GetLastError()); return FALSE; } @@ -1008,7 +1008,7 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive, get_filesystem_serial( volume ); } - TRACE("fs_type %#x, label %s, serial %08x\n", volume->fs_type, debugstr_w(volume->label), volume->serial); + TRACE("fs_type %#x, label %s, serial %08lx\n", volume->fs_type, debugstr_w(volume->label), volume->serial); if (guid && memcmp( &volume->guid, guid, sizeof(volume->guid) )) { @@ -1526,7 +1526,7 @@ NTSTATUS query_unix_drive( void *buff, SIZE_T insize, SIZE_T outsize, IO_STATUS_ ptr += strlen(ptr) + 1; } - TRACE( "returning %c: dev %s mount %s type %u\n", + TRACE( "returning %c: dev %s mount %s type %lu\n", letter, debugstr_a(device), debugstr_a(mount_point), type ); iosb->Information = ptr - (char *)output; @@ -1622,7 +1622,7 @@ static NTSTATUS WINAPI harddisk_query_volume( DEVICE_OBJECT *device, IRP *irp ) struct volume *volume; NTSTATUS status; - TRACE( "volume query %x length %u\n", info_class, length ); + TRACE( "volume query %x length %lu\n", info_class, length ); EnterCriticalSection( &device_section ); volume = dev->volume; @@ -1722,7 +1722,7 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp ) struct disk_device *dev = device->DeviceExtension; NTSTATUS status; - TRACE( "ioctl %x insize %u outsize %u\n", + TRACE( "ioctl %lx insize %lu outsize %lu\n", irpsp->Parameters.DeviceIoControl.IoControlCode, irpsp->Parameters.DeviceIoControl.InputBufferLength, irpsp->Parameters.DeviceIoControl.OutputBufferLength ); @@ -1794,7 +1794,7 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp ) default: { ULONG code = irpsp->Parameters.DeviceIoControl.IoControlCode; - FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n", + FIXME("Unsupported ioctl %lx (device=%lx access=%lx func=%lx method=%lx)\n", code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3); status = STATUS_NOT_SUPPORTED; break; @@ -1864,7 +1864,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p status = IoCreateDevice( driver, 0, &nt_name, 0, 0, FALSE, &dev_obj ); if (status != STATUS_SUCCESS) { - FIXME( "IoCreateDevice %s got %x\n", debugstr_w(nt_name.Buffer), status ); + FIXME( "IoCreateDevice %s got %lx\n", debugstr_w(nt_name.Buffer), status ); return FALSE; } swprintf( symlink_buffer, ARRAY_SIZE(symlink_buffer), symlink_format, n ); diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 1be55bee419..1f9bd56a384 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -251,7 +251,7 @@ static NTSTATUS define_unix_drive( const void *in_buff, SIZE_T insize ) { enum device_type type = DEVICE_UNKNOWN; - TRACE( "defining %c: dev %s mount %s type %u\n", + TRACE( "defining %c: dev %s mount %s type %lu\n", letter, debugstr_a(device), debugstr_a(mount_point), input->type ); switch (input->type) { @@ -467,7 +467,7 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp ) NTSTATUS status; ULONG info = 0; - TRACE( "ioctl %x insize %u outsize %u\n", + TRACE( "ioctl %lx insize %lu outsize %lu\n", irpsp->Parameters.DeviceIoControl.IoControlCode, irpsp->Parameters.DeviceIoControl.InputBufferLength, irpsp->Parameters.DeviceIoControl.OutputBufferLength ); @@ -592,7 +592,7 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp ) else status = STATUS_INVALID_PARAMETER; break; default: - FIXME( "ioctl %x not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode ); + FIXME( "ioctl %lx not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode ); status = STATUS_NOT_SUPPORTED; break; } @@ -641,7 +641,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) status = IoCreateSymbolicLink( &linkW, &nameW ); if (status) { - FIXME( "failed to create device error %x\n", status ); + FIXME( "failed to create device error %lx\n", status ); return status; }