From a446c53ef3adf00aa669ac73f63a536bf62b117c Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 14 Dec 2023 14:25:16 +0100 Subject: [PATCH] [freerdp,proxy] add version command --- server/proxy/cli/freerdp_proxy.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/proxy/cli/freerdp_proxy.c b/server/proxy/cli/freerdp_proxy.c index 031b3deb0..bc53ae29a 100644 --- a/server/proxy/cli/freerdp_proxy.c +++ b/server/proxy/cli/freerdp_proxy.c @@ -76,6 +76,14 @@ static WINPR_NORETURN(void usage(const char* app)) printf("%s --buildconfig Print the build configuration.\n", app); printf("%s Start the proxy with \n", app); printf("%s --dump-config Create a template \n", app); + printf("%s -v Print out binary version.\n", app); + printf("%s --version Print out binary version.\n", app); + exit(0); +} + +static void version(const char* app) +{ + printf("%s version %s", app, freerdp_get_version_string()); exit(0); } @@ -119,6 +127,10 @@ int main(int argc, char* argv[]) status = 0; goto fail; } + else if (_stricmp(arg, "-v") == 0) + version(argv[0]); + else if (_stricmp(arg, "--version") == 0) + version(argv[0]); config_path = argv[1]; }