mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 11:42:42 +00:00
ntdll: Use STATUS_NOT_SUPPORTED for internal machine mismatch errors.
It corresponds to what NtMapViewOfSectionEx() returns with an explicitly specified machine.
This commit is contained in:
parent
685f1b6b05
commit
af01944a8c
|
@ -2580,7 +2580,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm, HANDL
|
|||
if (!is_valid_binary( handle, image_info ))
|
||||
{
|
||||
TRACE( "%s is for arch %x, continuing search\n", debugstr_us(nt_name), image_info->Machine );
|
||||
status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
status = STATUS_NOT_SUPPORTED;
|
||||
NtClose( *mapping );
|
||||
*mapping = NULL;
|
||||
}
|
||||
|
@ -3004,11 +3004,11 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
|
|||
RtlAppendUnicodeToString( new_name, L"\\" );
|
||||
RtlAppendUnicodeToString( new_name, name );
|
||||
status = open_dll_file( new_name, pwm, mapping, image_info, id );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE;
|
||||
if (status == STATUS_NOT_SUPPORTED) found_image = TRUE;
|
||||
else if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
RtlFreeUnicodeString( new_name );
|
||||
}
|
||||
if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
if (found_image) status = STATUS_NOT_SUPPORTED;
|
||||
|
||||
done:
|
||||
RtlFreeUnicodeString( new_name );
|
||||
|
@ -3062,13 +3062,13 @@ static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING *
|
|||
if ((status = RtlDosPathNameToNtPathName_U_WithStatus( name, nt_name, NULL, NULL ))) goto done;
|
||||
|
||||
status = open_dll_file( nt_name, pwm, mapping, image_info, id );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE;
|
||||
if (status == STATUS_NOT_SUPPORTED) found_image = TRUE;
|
||||
else if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
RtlFreeUnicodeString( nt_name );
|
||||
paths = ptr;
|
||||
}
|
||||
|
||||
if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
if (found_image) status = STATUS_NOT_SUPPORTED;
|
||||
|
||||
done:
|
||||
RtlFreeHeap( GetProcessHeap(), 0, name );
|
||||
|
@ -3127,7 +3127,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, UNI
|
|||
else if (!(status = RtlDosPathNameToNtPathName_U_WithStatus( libname, nt_name, NULL, NULL )))
|
||||
status = open_dll_file( nt_name, pwm, mapping, image_info, id );
|
||||
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
if (status == STATUS_NOT_SUPPORTED) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
|
||||
done:
|
||||
RtlFreeHeap( GetProcessHeap(), 0, fullname );
|
||||
|
|
|
@ -1440,7 +1440,7 @@ static NTSTATUS open_builtin_so_file( const char *name, OBJECT_ATTRIBUTES *attr,
|
|||
status = STATUS_PROCEDURE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
else status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
else status = STATUS_NOT_SUPPORTED;
|
||||
|
||||
close( fd );
|
||||
return status;
|
||||
|
@ -1525,7 +1525,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
|
|||
file[pos + len + 1] = 0;
|
||||
ptr = prepend( file + pos, dll_paths[i], strlen(dll_paths[i]) );
|
||||
status = open_builtin_pe_file( ptr, &attr, module, size_ptr, image_info, limit, machine, prefer_native );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH)
|
||||
if (status == STATUS_NOT_SUPPORTED)
|
||||
{
|
||||
found_image = TRUE;
|
||||
continue;
|
||||
|
@ -1533,11 +1533,11 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
|
|||
if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
strcpy( file + pos + len + 1, ".so" );
|
||||
status = open_builtin_so_file( ptr, &attr, module, image_info, machine, prefer_native );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE;
|
||||
if (status == STATUS_NOT_SUPPORTED) found_image = TRUE;
|
||||
else if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
}
|
||||
|
||||
if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
if (found_image) status = STATUS_NOT_SUPPORTED;
|
||||
WARN( "cannot find builtin library for %s\n", debugstr_us(nt_name) );
|
||||
done:
|
||||
if (status >= 0 && ext)
|
||||
|
@ -1591,7 +1591,7 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename,
|
|||
return find_builtin_dll( &nt_name, module, size, &info, limit, machine, FALSE );
|
||||
default:
|
||||
status = find_builtin_dll( &nt_name, module, size, &info, limit, machine, (loadorder == LO_DEFAULT) );
|
||||
if (status == STATUS_DLL_NOT_FOUND || status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH)
|
||||
if (status == STATUS_DLL_NOT_FOUND || status == STATUS_NOT_SUPPORTED)
|
||||
return STATUS_IMAGE_ALREADY_LOADED;
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -3050,7 +3050,7 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size
|
|||
else if (machine && image_info->machine != machine)
|
||||
{
|
||||
TRACE( "%s is for arch %04x, continuing search\n", debugstr_w(filename), image_info->machine );
|
||||
status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
|
||||
status = STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
else if (prefer_native && (image_info->dll_charact & IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue