wine-staging/patches/Staging/0004-loader-Add-commandline-option-patches-to-show-the-pa.patch

100 lines
3.0 KiB
Diff
Raw Normal View History

From 6661529d2422f99287336b764fe7a5b61484b8ad Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
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 | 36 +++++++++++++++++++++++++++++++++++-
3 files changed, 44 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..b1df463 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,39 @@ 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;
+ int revision;
+ }
+ *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", cur->subject );
+ if (cur->revision != 1)
+ printf( " [rev %d]", cur->revision );
+ printf( "\n" );
+ cur++;
+ }
+ printf( "\n" );
+ }
+
+ exit(0);
+ }
}
--
2.1.3