"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/mountmgr.sys/device.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

device.c  (wine-5.12.tar.xz):device.c  (wine-5.13.tar.xz)
skipping to change at line 1010 skipping to change at line 1010
TRACE( "found matching volume %s for device %s mount %s type %u\n", TRACE( "found matching volume %s for device %s mount %s type %u\n",
debugstr_guid(&volume->guid), debugstr_a(device), debugstr_a(moun t_point), type ); debugstr_guid(&volume->guid), debugstr_a(device), debugstr_a(moun t_point), type );
return grab_volume( volume ); return grab_volume( volume );
} }
return NULL; return NULL;
} }
static BOOL get_volume_device_info( struct volume *volume ) static BOOL get_volume_device_info( struct volume *volume )
{ {
const char *unix_device = volume->device->unix_device; const char *unix_device = volume->device->unix_device;
ANSI_STRING unix_name; WCHAR *name;
UNICODE_STRING nt_name;
OBJECT_ATTRIBUTES attr;
HANDLE handle; HANDLE handle;
NTSTATUS ret;
CDROM_TOC toc; CDROM_TOC toc;
DWORD size; DWORD size;
BYTE superblock[SUPERBLOCK_SIZE]; BYTE superblock[SUPERBLOCK_SIZE];
IO_STATUS_BLOCK io;
if (!unix_device) if (!unix_device)
return FALSE; return FALSE;
RtlInitAnsiString( &unix_name, unix_device ); if (!(name = wine_get_dos_file_name( unix_device )))
if ((ret = wine_unix_to_nt_file_name( &unix_name, &nt_name )))
{ {
ERR("Failed to convert %s to NT, status %#x\n", debugstr_a(unix_device), ret); ERR("Failed to convert %s to NT, err %u\n", debugstr_a(unix_device), Get LastError());
return FALSE; return FALSE;
} }
handle = CreateFileW( name, GENERIC_READ | SYNCHRONIZE, FILE_SHARE_READ | FI
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ) LE_SHARE_WRITE,
; NULL, OPEN_EXISTING, 0, 0 );
if ((ret = NtOpenFile( &handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE RtlFreeHeap( GetProcessHeap(), 0, name );
_SHARE_READ | FILE_SHARE_WRITE, if (handle == INVALID_HANDLE_VALUE)
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALER
T )))
{ {
WARN("Failed to open %s, status %#x\n", debugstr_a(unix_device), ret); WARN("Failed to open %s, err %u\n", debugstr_a(unix_device), GetLastErro
RtlFreeUnicodeString( &nt_name ); r());
return FALSE; return FALSE;
} }
if (DeviceIoControl( handle, IOCTL_CDROM_READ_TOC, NULL, 0, &toc, sizeof(toc ), &size, 0 )) if (DeviceIoControl( handle, IOCTL_CDROM_READ_TOC, NULL, 0, &toc, sizeof(toc ), &size, 0 ))
{ {
if (!(toc.TrackData[0].Control & 0x04)) /* audio track */ if (!(toc.TrackData[0].Control & 0x04)) /* audio track */
{ {
static const WCHAR audiocdW[] = {'A','u','d','i','o',' ','C','D',0}; static const WCHAR audiocdW[] = {'A','u','d','i','o',' ','C','D',0};
TRACE( "%s: found audio CD\n", debugstr_a(unix_device) ); TRACE( "%s: found audio CD\n", debugstr_a(unix_device) );
lstrcpynW( volume->label, audiocdW, ARRAY_SIZE(volume->label) ); lstrcpynW( volume->label, audiocdW, ARRAY_SIZE(volume->label) );
 End of changes. 7 change blocks. 
17 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)