From: Hans Leidekker hans@codeweavers.com
--- dlls/ntdll/tests/info.c | 13 +++++++++++++ dlls/ntdll/unix/system.c | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 7741293d815..3f40e84a438 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1094,6 +1094,11 @@ static void test_query_interrupt(void)
static void test_time_adjustment(void) { + struct + { + char enabled; + ULONG flags; + } leap; SYSTEM_TIME_ADJUSTMENT_QUERY query; SYSTEM_TIME_ADJUSTMENT adjust; NTSTATUS status; @@ -1124,6 +1129,14 @@ static void test_time_adjustment(void) status = pNtSetSystemInformation( SystemTimeAdjustmentInformation, &adjust, sizeof(adjust)+1 ); todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "got %08lx\n", status ); + + len = 0; + memset( &leap, 0xcc, sizeof(leap) ); + status = pNtQuerySystemInformation( SystemLeapSecondInformation, &leap, sizeof(leap), &len ); + ok( status == STATUS_SUCCESS, "got %08lx\n", status ); + ok( len == sizeof(leap), "wrong len %lu\n", len ); + ok( leap.enabled == 1, "got %u\n", leap.enabled ); + ok( !leap.flags, "got %lx\n", leap.flags ); }
static void test_query_kerndebug(void) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index bfe59d4cf7e..eb901e6a00a 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -3664,6 +3664,25 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, case SystemCpuSetInformation: /* 175 */ return NtQuerySystemInformationEx(class, NULL, 0, info, size, ret_size);
+ case SystemLeapSecondInformation: /* 206 */ + { + struct + { + char enabled; + ULONG flags; + } *leap = info; + + len = sizeof(*leap); + if (size >= len) + { + FIXME( "SystemLeapSecondInformation - stub\n" ); + leap->enabled = 1; + leap->flags = 0; + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + break; + } + /* Wine extensions */
case SystemWineVersionInformation: /* 1000 */