FreeRDP/client/Sample
Ondrej Holy d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
..
CMakeLists.txt Install sample client binary. 2020-02-18 11:02:43 +01:00
ModuleOptions.cmake freerdp: remove vendor-specific options from build system, add automatic ways of including external clients/servers 2013-09-03 20:37:04 -04:00
tf_channels.c Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00
tf_channels.h Reformatted to new style 2019-11-07 10:53:54 +01:00
tf_freerdp.c client: Fix exit codes for /help and similar option (#6741) 2021-01-22 09:44:55 +01:00
tf_freerdp.h Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00