From 98592ff61773a99e32b58e9da7df0fd221bcb9c0 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Mar 2016 20:42:03 +0100
Subject: ntdll: Do not update iosb.Status after FSCTL_PIPE_LISTEN call.

---
 dlls/kernel32/tests/pipe.c | 2 +-
 dlls/ntdll/file.c          | 2 +-
 dlls/ntdll/tests/pipe.c    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 77381f2..a896843 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2141,7 +2141,7 @@ static void test_overlapped_error(void)
     err = GetLastError();
     ok(ret == FALSE, "ConnectNamedPipe succeeded\n");
     ok(err == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %u\n", err);
-    todo_wine ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal);
+    ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal);
 
     CloseHandle(file);
     CloseHandle(pipe);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 46fea51..f9e7b3e 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1802,7 +1802,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
     default:
         status = server_ioctl_file( handle, event, apc, apc_context, io, code,
                                     in_buffer, in_size, out_buffer, out_size );
-        break;
+        return status;
     }
 
     if (status != STATUS_PENDING) io->u.Status = status;
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 5b19ad3..77c451b 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -305,7 +305,7 @@ static void test_overlapped(void)
     memset(&iosb, 0x55, sizeof(iosb));
     res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
     ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %x\n", res);
-    todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+    ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
 
     CloseHandle(hPipe);
     CloseHandle(hClient);
@@ -388,7 +388,7 @@ static void test_alertable(void)
     todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res);
 
     ok(userapc_called, "user apc didn't run\n");
-    todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+    ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
     ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
     ok(!ioapc_called, "IOAPC ran\n");
 
-- 
2.7.1

