Silencing RtlNtStatusToDosErrorNoTeb() a bit

Wolfram Sang wolfram at
Tue Dec 1 16:45:16 CST 2009


while debugging an application (Project One, available at [1]), I
noticed that wine (today's git) throws a lot of these fixmes:

fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for c0000109

Looking around, I found this page[2] stating that ERROR_MR_MID_NOT_FOUND
is an expected return value for c0000109, so that the fixme is not
needed here. I updated the if clause accordingly:

diff --git a/dlls/ntdll/error.c b/dlls/ntdll/error.c
index 9469f6f..e125163 100644
--- a/dlls/ntdll/error.c
+++ b/dlls/ntdll/error.c
@@ -68,7 +68,9 @@ ULONG WINAPI RtlNtStatusToDosErrorNoTeb( NTSTATUS status )
          if (status < table->end)
              DWORD ret = table->table[status - table->start];
-            if (ret == ERROR_MR_MID_NOT_FOUND) FIXME( "no mapping for %08x\n", status );
+            if (ret == ERROR_MR_MID_NOT_FOUND &&
+               status != STATUS_MESSAGE_NOT_FOUND)
+               FIXME( "no mapping for %08x\n", status );
              return ret;

This solution has the advantage of being not very intrusive, but the
disadvantage that it might be not nicely maintainable. Another &&-block
has to be added for each other status found validly returning

Another solution might be to define, let's say, ERROR_WINE_FIXME for all
real fixmes and convert them to ERROR_MR_MID_NOT_FOUND. Something like
(just a draft):

             #define ERROR_WINE_FIXME 0xffffffff

             DWORD ret = table->table[status - table->start];
             if (ret == ERROR_WINE_FIXME)
                 FIXME( "no mapping for %08x\n", status );
                 ret = ERROR_MR_MID_NOT_FOUND;
             return ret;

             [and lots of table entries changed]

Well, this is pretty intrusive, but may be better distinguishing the
different cases perhaps. Then again, this additional #define is
polluting the ERROR_-namespace.

I think I prefer the first version for now, perhaps there is no second
status validly returning ERROR_MR_MID_NOT_FOUND? Any advice on how I
should proceed?

Thanks in advance,



More information about the wine-devel mailing list