Alexandre Julliard : ntdll: Print the version mismatch error from the Unix side.

Alexandre Julliard julliard at winehq.org
Fri Feb 19 17:20:09 CST 2021


Module: wine
Branch: master
Commit: 3f3f673c29937e8bdec2de590b21b18a1747f398
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3f3f673c29937e8bdec2de590b21b18a1747f398

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Feb 19 15:24:49 2021 +0100

ntdll: Print the version mismatch error from the Unix side.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/loader.c       | 2 +-
 dlls/ntdll/unix/process.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index abc2c3f828c..3ea315d83da 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4108,7 +4108,7 @@ static NTSTATUS process_init(void)
  */
 NTSTATUS CDECL __wine_set_unix_funcs( int version, const struct unix_funcs *funcs )
 {
-    assert( version == NTDLL_UNIXLIB_VERSION );
+    if (version != NTDLL_UNIXLIB_VERSION) return STATUS_REVISION_MISMATCH;
     unix_funcs = funcs;
     return process_init();
 }
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 6b7cbcd9c1a..083a3a82a1d 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -701,6 +701,9 @@ done:
     case STATUS_INVALID_IMAGE_NOT_MZ:
         ERR( "%s not supported on this system\n", debugstr_us(&params->ImagePathName) );
         break;
+    case STATUS_REVISION_MISMATCH:
+        ERR( "ntdll library version mismatch\n" );
+        break;
     default:
         ERR( "failed to load %s error %x\n", debugstr_us(&params->ImagePathName), status );
         break;




More information about the wine-cvs mailing list