From 378c383c738f097fd6fa81badca0cde5c6858970 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 29 May 2014 23:43:45 +0200 Subject: loader: Add commandline option --patches to show the patch list. --- dlls/ntdll/misc.c | 8 ++++++++ dlls/ntdll/ntdll.spec | 1 + loader/main.c | 32 +++++++++++++++++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index ad1b43b..1f985e7 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -55,6 +55,14 @@ const char * CDECL NTDLL_wine_get_version(void) } /********************************************************************* + * wine_get_patches (NTDLL.@) + */ +const void * CDECL NTDLL_wine_get_patches(void) +{ + return wine_get_patches(); +} + +/********************************************************************* * wine_get_build_id (NTDLL.@) */ const char * CDECL NTDLL_wine_get_build_id(void) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 7e95969..f9483aa 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1421,6 +1421,7 @@ # Version @ cdecl wine_get_version() NTDLL_wine_get_version +@ cdecl wine_get_patches() NTDLL_wine_get_patches @ cdecl wine_get_build_id() NTDLL_wine_get_build_id @ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version diff --git a/loader/main.c b/loader/main.c index ac67290..db9a176 100644 --- a/loader/main.c +++ b/loader/main.c @@ -89,7 +89,8 @@ static void check_command_line( int argc, char *argv[] ) static const char usage[] = "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" " wine --help Display this help and exit\n" - " wine --version Output version information and exit"; + " wine --version Output version information and exit\n" + " wine --patches Output patch information and exit"; if (argc <= 1) { @@ -106,6 +107,35 @@ static void check_command_line( int argc, char *argv[] ) printf( "%s\n", wine_get_build_id() ); exit(0); } + if (!strcmp( argv[1], "--patches" )) + { + const struct + { + const char *author; + const char *subject; + } + *next, *cur = wine_get_patches(); + + while (cur->author) + { + next = cur + 1; + while (next->author) + { + if (strcmp(cur->author, next->author)) break; + next++; + } + + printf("%s (%d):\n", cur->author, next - cur); + while (cur < next) + { + printf(" %s\n", cur->subject); + cur++; + } + printf("\n"); + } + + exit(0); + } } -- 2.1.3