diff --git a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch index ad057578..1526f11c 100644 --- a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch @@ -1,4 +1,4 @@ -From 55d0f2284439c3d5661319d10ae333c9e3ea3ad7 Mon Sep 17 00:00:00 2001 +From 133fbf15df8b8fd81052d545da7d7d85d4bbe16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 05:02:21 +0100 Subject: [PATCH] setupapi: Implement SetupAddToDiskSpaceList. @@ -174,7 +174,7 @@ index dcfa39b5a92..cc309f9393c 100644 + return ret; } diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 577b1f84a2a..e60b4b32b5e 100644 +index 577b1f84a2a..3cd83c8471f 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -19,6 +19,7 @@ @@ -353,7 +353,7 @@ index 577b1f84a2a..e60b4b32b5e 100644 + ret = SetupAddToDiskSpaceListA(NULL, "C:\\some-file.dat", 0, FILEOP_COPY, 0, 0); + ok(!ret, "Expected SetupAddToDiskSpaceListA to return FALSE, got %d\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, -+ "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", GetLastError()); ++ "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError()); + + handle = SetupCreateDiskSpaceListA(NULL, 0, 0); + ok(handle != NULL,"Expected SetupCreateDiskSpaceListA to return a valid handle\n"); @@ -367,7 +367,7 @@ index 577b1f84a2a..e60b4b32b5e 100644 + ret = SetupAddToDiskSpaceListA(handle, "C:\\some-file.dat", 0, FILEOP_RENAME, 0, 0); + ok(!ret, "Expected SetupAddToDiskSpaceListA to return FALSE\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, -+ "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); ++ "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); + + ret = SetupAddToDiskSpaceListA(handle, NULL, 0, FILEOP_RENAME, 0, 0); + ok(ret || broken(!ret) /* >= Vista */, "Expected SetupAddToDiskSpaceListA to succeed\n"); @@ -389,5 +389,5 @@ index 577b1f84a2a..e60b4b32b5e 100644 + test_SetupAddToDiskSpaceListA(); } -- -2.34.1 +2.35.1 diff --git a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch index a3253c80..7317accf 100644 --- a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch @@ -1,4 +1,4 @@ -From 35249229259bab1a14e23f74ff1a73bbf3751b60 Mon Sep 17 00:00:00 2001 +From 49440e98e566e15c9785415e966b4ceb80077f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 05:03:11 +0100 Subject: [PATCH] setupapi: Implement SetupQueryDrivesInDiskSpaceList. @@ -132,7 +132,7 @@ index af058b8eac8..55483941033 100644 * SetupAddToSourceListA (SETUPAPI.@) */ diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 2bdf8babce0..e39bb4eb47a 100644 +index 3cd83c8471f..930b957e913 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -616,6 +616,75 @@ static void test_SetupAddToDiskSpaceListA(void) @@ -155,7 +155,7 @@ index 2bdf8babce0..e39bb4eb47a 100644 + size = 0; + ret = SetupQueryDrivesInDiskSpaceListA(handle, NULL, 0, &size); + ok(ret, "Expected SetupQueryDrivesInDiskSpaceListA to succeed\n"); -+ ok(size == 1, "Expected size 1, got %u\n", size); ++ ok(size == 1, "Expected size 1, got %lu\n", size); + + ret = SetupAddToDiskSpaceListA(handle, "F:\\random-file.dat", 0, FILEOP_COPY, 0, 0); + ok(ret, "Expected SetupAddToDiskSpaceListA to succeed\n"); @@ -172,34 +172,34 @@ index 2bdf8babce0..e39bb4eb47a 100644 + size = 0; + ret = SetupQueryDrivesInDiskSpaceListA(handle, NULL, 0, &size); + ok(ret, "Expected SetupQueryDrivesInDiskSpaceListA to succeed\n"); -+ ok(size == 10, "Expected size 10, got %u\n", size); ++ ok(size == 10, "Expected size 10, got %lu\n", size); + + size = 0; + ret = SetupQueryDrivesInDiskSpaceListA(handle, buffer, 0, &size); + ok(!ret, "Expected SetupQueryDrivesInDiskSpaceListA to fail\n"); -+ ok(size == 4, "Expected size 4, got %u\n", size); ++ ok(size == 4, "Expected size 4, got %lu\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, -+ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); ++ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); + + size = 0; + ret = SetupQueryDrivesInDiskSpaceListA(handle, buffer, 4, &size); + ok(!ret, "Expected SetupQueryDrivesInDiskSpaceListA to fail\n"); -+ ok(size == 7, "Expected size 7, got %u\n", size); ++ ok(size == 7, "Expected size 7, got %lu\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, -+ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); ++ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); + + size = 0; + ret = SetupQueryDrivesInDiskSpaceListA(handle, buffer, 7, &size); + ok(!ret, "Expected SetupQueryDrivesInDiskSpaceListA to fail\n"); -+ ok(size == 10, "Expected size 10, got %u\n", size); ++ ok(size == 10, "Expected size 10, got %lu\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, -+ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); ++ "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); + + size = 0; + memset(buffer, 0xff, sizeof(buffer)); + ret = SetupQueryDrivesInDiskSpaceListA(handle, buffer, sizeof(buffer), &size); + ok(ret, "Expected SetupQueryDrivesInDiskSpaceListA to succeed\n"); -+ ok(size == 10, "Expected size 10, got %u\n", size); ++ ok(size == 10, "Expected size 10, got %lu\n", size); + ok(!memcmp("f:\0g:\0x:\0\0", buffer, 10), "Device list does not match\n"); + + memset(buffer, 0xff, sizeof(buffer)); @@ -218,5 +218,5 @@ index 2bdf8babce0..e39bb4eb47a 100644 + test_SetupQueryDrivesInDiskSpaceListA(); } -- -2.34.1 +2.35.1 diff --git a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch index 9a9464c2..6c7dd966 100644 --- a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch @@ -1,4 +1,4 @@ -From 82a42af095d379ed04ed3f0b369a156c87981d48 Mon Sep 17 00:00:00 2001 +From c1b129ea5fb6f23e8d07cdb0c3c74e8672e880e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 4 Mar 2016 04:53:00 +0100 Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList. @@ -12,7 +12,7 @@ Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList. 5 files changed, 328 insertions(+), 4 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 01b08c1408e..8dbd0f0cc3d 100644 +index c079014a109..436af0ec1f0 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c @@ -20,6 +20,7 @@ @@ -168,7 +168,7 @@ index 01b08c1408e..8dbd0f0cc3d 100644 BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, HINF InfHandle, HINF LayoutInfHandle, diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c -index dc718cc66fc..ad626f113f1 100644 +index f6c83d30e1d..4e5d3f99e9c 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -338,7 +338,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA @@ -209,7 +209,7 @@ index 7681348a11c..edc833f5768 100644 struct callback_WtoA_context diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 4ba9fea9e0a..7b8bcf4a342 100644 +index 0cacf9a75aa..8e2eb88bf93 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -30,6 +30,8 @@ @@ -329,39 +329,39 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + + if (!GetTempPathA(MAX_PATH, tmp)) + { -+ win_skip("GetTempPath failed with error %d\n", GetLastError()); ++ win_skip("GetTempPath failed with error %lu\n", GetLastError()); + return; + } + + if (!GetTempFileNameA(tmp, "inftest", 0, tmpfilename)) + { -+ win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); ++ win_skip("GetTempFileNameA failed with error %lu\n", GetLastError()); + return; + } + + inf = inf_open_file_content(tmpfilename, STD_HEADER "[a]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n", &err_line); -+ ok(!!inf, "Failed to open inf file (%d, line %d)\n", GetLastError(), err_line); ++ ok(!!inf, "Failed to open inf file (%lu, line %d)\n", GetLastError(), err_line); + + diskspace = SetupCreateDiskSpaceListA(NULL, 0, SPDSL_IGNORE_DISK); + ok(diskspace != NULL,"Expected SetupCreateDiskSpaceListA to return a valid handle\n"); + + ret = SetupAddSectionToDiskSpaceListA(diskspace, NULL, NULL, "a", FILEOP_COPY, 0, 0); + ok(!ret, "Expected SetupAddSectionToDiskSpaceListA to fail\n"); -+ ok(GetLastError() == ERROR_SECTION_NOT_FOUND, "Expected ERROR_SECTION_NOT_FOUND as error, got %u\n", ++ ok(GetLastError() == ERROR_SECTION_NOT_FOUND, "Expected ERROR_SECTION_NOT_FOUND as error, got %lu\n", + GetLastError()); + + ret = SetupAddSectionToDiskSpaceListA(NULL, inf, NULL, "a", FILEOP_COPY, 0, 0); + ok(!ret, "Expected SetupAddSectionToDiskSpaceListA to fail\n"); -+ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %u\n", ++ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %lu\n", + GetLastError()); + + ret = SetupAddSectionToDiskSpaceListA(NULL, inf, NULL, "b", FILEOP_COPY, 0, 0); + ok(!ret, "Expected SetupAddSectionToDiskSpaceListA to fail\n"); -+ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %u\n", ++ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %lu\n", + GetLastError()); + + ret = SetupAddSectionToDiskSpaceListA(diskspace, inf, NULL, "a", 0, 0, 0); -+ ok(ret, "Expected SetupAddSectionToDiskSpaceListA to succeed (%u)\n", GetLastError()); ++ ok(ret, "Expected SetupAddSectionToDiskSpaceListA to succeed (%lu)\n", GetLastError()); + + ok(SetupDestroyDiskSpaceList(diskspace), + "Expected SetupDestroyDiskSpaceList to succeed\n"); @@ -371,7 +371,7 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + err_line = 0; + + inf = inf_open_file_content(tmpfilename, section_test[i].data, &err_line); -+ ok(!!inf, "test %d: Failed to open inf file (%d, line %d)\n", i, GetLastError(), err_line); ++ ok(!!inf, "test %d: Failed to open inf file (%lu, line %d)\n", i, GetLastError(), err_line); + if (!inf) continue; + + diskspace = SetupCreateDiskSpaceListA(NULL, 0, SPDSL_IGNORE_DISK); @@ -386,18 +386,18 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + SetLastError(0xdeadbeef); + ret = SetupAddSectionToDiskSpaceListA(diskspace, inf, NULL, section->name, section->fileop, 0, 0); + if (section->result) -+ ok(ret, "test %d: Expected adding section %d to succeed (%u)\n", i, j, GetLastError()); ++ ok(ret, "test %d: Expected adding section %d to succeed (%lu)\n", i, j, GetLastError()); + else + { + ok(!ret, "test %d: Expected adding section %d to fail\n", i, j); -+ ok(GetLastError() == section->error_code, "test %d: Expected %u as error, got %u\n", ++ ok(GetLastError() == section->error_code, "test %d: Expected %lu as error, got %lu\n", + i, section->error_code, GetLastError()); + } + } + + memset(buffer, 0x0, sizeof(buffer)); + ret = SetupQueryDrivesInDiskSpaceListA(diskspace, buffer, sizeof(buffer), NULL); -+ ok(ret, "test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%u)\n", i, GetLastError()); ++ ok(ret, "test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%lu)\n", i, GetLastError()); + ok(!memcmp(section_test[i].devices, buffer, section_test[i].device_length), + "test %d: Device list (%s) does not match\n", i, buffer); + @@ -409,9 +409,9 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + + space = 0; + ret = SetupQuerySpaceRequiredOnDriveA(diskspace, usage->dev, &space, NULL, 0); -+ ok(ret, "test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%u)\n", ++ ok(ret, "test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%lu)\n", + i, usage->dev, GetLastError()); -+ ok(space == usage->usage, "test %d: Expected size %u for device %s, got %u\n", ++ ok(space == usage->usage, "test %d: Expected size %lu for device %s, got %lu\n", + i, (DWORD)usage->usage, usage->dev, (DWORD)space); + } + @@ -432,5 +432,5 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + test_SetupAddSectionToDiskSpaceListA(); } -- -2.32.0 +2.35.1 diff --git a/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch b/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch index 7c81b958..737744b2 100644 --- a/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch +++ b/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch @@ -209,18 +209,18 @@ index 7b8bcf4a342..13e025a8cfd 100644 + + if (!GetTempPathA(MAX_PATH, tmp)) + { -+ win_skip("GetTempPath failed with error %d\n", GetLastError()); ++ win_skip("GetTempPath failed with error %ld\n", GetLastError()); + return; + } + + if (!GetTempFileNameA(tmp, "inftest", 0, tmpfilename)) + { -+ win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); ++ win_skip("GetTempFileNameA failed with error %ld\n", GetLastError()); + return; + } + + inf = inf_open_file_content(tmpfilename, STD_HEADER "[a]\nCopyFiles=b\n[b]\ntest,,,\n[SourceDisksFiles]\ntest=1,,4096\r\n", &err_line); -+ ok(!!inf, "Failed to open inf file (%d, line %d)\n", GetLastError(), err_line); ++ ok(!!inf, "Failed to open inf file (%ld, line %u)\n", GetLastError(), err_line); + + diskspace = SetupCreateDiskSpaceListA(NULL, 0, SPDSL_IGNORE_DISK); + ok(diskspace != NULL,"Expected SetupCreateDiskSpaceListA to return a valid handle\n"); @@ -230,16 +230,16 @@ index 7b8bcf4a342..13e025a8cfd 100644 + + ret = SetupAddInstallSectionToDiskSpaceListA(NULL, inf, NULL, "a", 0, 0); + ok(!ret, "Expected SetupAddInstallSectionToDiskSpaceListA to fail\n"); -+ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %u\n", ++ ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE as error, got %lu\n", + GetLastError()); + + ret = SetupAddInstallSectionToDiskSpaceListA(diskspace, inf, NULL, NULL, 0, 0); + ok(!ret || broken(ret), "Expected SetupAddSectionToDiskSpaceListA to fail\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(ret), -+ "Expected ERROR_INVALID_PARAMETER as error, got %u\n", GetLastError()); ++ "Expected ERROR_INVALID_PARAMETER as error, got %lu\n", GetLastError()); + + ret = SetupAddInstallSectionToDiskSpaceListA(diskspace, inf, NULL, "", 0, 0); -+ ok(ret, "Expected SetupAddInstallSectionToDiskSpaceListA to succeed (%u)\n", GetLastError()); ++ ok(ret, "Expected SetupAddInstallSectionToDiskSpaceListA to succeed (%lu)\n", GetLastError()); + + ok(SetupDestroyDiskSpaceList(diskspace), + "Expected SetupDestroyDiskSpaceList to succeed\n"); @@ -249,7 +249,7 @@ index 7b8bcf4a342..13e025a8cfd 100644 + err_line = 0; + + inf = inf_open_file_content(tmpfilename, section_test_i[i].data, &err_line); -+ ok(!!inf, "test %d: Failed to open inf file (%d, line %d)\n", i, GetLastError(), err_line); ++ ok(!!inf, "test %u: Failed to open inf file (%lu, line %u)\n", i, GetLastError(), err_line); + if (!inf) continue; + + diskspace = SetupCreateDiskSpaceListA(NULL, 0, SPDSL_IGNORE_DISK); @@ -264,18 +264,18 @@ index 7b8bcf4a342..13e025a8cfd 100644 + SetLastError(0xdeadbeef); + ret = SetupAddInstallSectionToDiskSpaceListA(diskspace, inf, NULL, section->name, 0, 0); + if (section->result) -+ ok(ret, "test %d: Expected adding section %d to succeed (%u)\n", i, j, GetLastError()); ++ ok(ret, "test %d: Expected adding section %d to succeed (%lu)\n", i, j, GetLastError()); + else + { + ok(!ret, "test %d: Expected adding section %d to fail\n", i, j); -+ ok(GetLastError() == section->error_code, "test %d: Expected %u as error, got %u\n", ++ ok(GetLastError() == section->error_code, "test %d: Expected %lu as error, got %lu\n", + i, section->error_code, GetLastError()); + } + } + + memset(buffer, 0x0, sizeof(buffer)); + ret = SetupQueryDrivesInDiskSpaceListA(diskspace, buffer, sizeof(buffer), NULL); -+ ok(ret, "test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%u)\n", i, GetLastError()); ++ ok(ret, "test %d: Expected SetupQueryDrivesInDiskSpaceListA to succeed (%lu)\n", i, GetLastError()); + ok(!memcmp(section_test_i[i].devices, buffer, section_test_i[i].device_length), + "test %d: Device list (%s) does not match\n", i, buffer); + @@ -287,9 +287,9 @@ index 7b8bcf4a342..13e025a8cfd 100644 + + space = 0; + ret = SetupQuerySpaceRequiredOnDriveA(diskspace, usage->dev, &space, NULL, 0); -+ ok(ret, "test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%u)\n", ++ ok(ret, "test %d: Expected SetupQuerySpaceRequiredOnDriveA to succeed for device %s (%lu)\n", + i, usage->dev, GetLastError()); -+ ok(space == usage->usage, "test %d: Expected size %u for device %s, got %u\n", ++ ok(space == usage->usage, "test %d: Expected size %lu for device %s, got %lu\n", + i, (DWORD)usage->usage, usage->dev, (DWORD)space); + } +