Removed FreeRDP_ListSmartcards setting

* Directly print smartcard list without intermediate setting
* Centralize the help text, clients do not need to add extra code
This commit is contained in:
Armin Novak 2022-02-02 13:15:58 +01:00 committed by akallabeth
parent 44c82cd929
commit b46d74806e
8 changed files with 3 additions and 30 deletions

View File

@ -32,7 +32,6 @@
#include <freerdp/client.h>
#include <freerdp/utils/signal.h>
#include <freerdp/locale/keyboard.h>
#include <freerdp/utils/smartcard_cli.h>
#include <linux/input.h>
@ -708,9 +707,6 @@ int main(int argc, char* argv[])
if (settings->ListMonitors)
wlf_list_monitors(wlc);
if (settings->ListSmartcards)
freerdp_smartcard_list(settings);
goto fail;
}

View File

@ -34,7 +34,6 @@
#include <freerdp/client/cmdline.h>
#include <freerdp/client/channels.h>
#include <freerdp/channels/channels.h>
#include <freerdp/utils/smartcard_cli.h>
#include "../resource/resource.h"
@ -107,10 +106,6 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if (status)
{
ret = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
if (settings->ListSmartcards)
freerdp_smartcard_list(settings);
goto out;
}

View File

@ -29,7 +29,6 @@
#include <freerdp/streamdump.h>
#include <freerdp/freerdp.h>
#include <freerdp/client/cmdline.h>
#include <freerdp/utils/smartcard_cli.h>
#include "../xf_client.h"
#include "../xfreerdp.h"
@ -65,9 +64,6 @@ int main(int argc, char* argv[])
if (settings->ListMonitors)
xf_list_monitors(xfc);
if (settings->ListSmartcards)
freerdp_smartcard_list(settings);
goto out;
}

View File

@ -54,6 +54,7 @@
#include <freerdp/client/cmdline.h>
#include <freerdp/version.h>
#include <freerdp/utils/smartcard_cli.h>
#include "cmdline.h"
@ -1373,7 +1374,7 @@ int freerdp_client_settings_command_line_status_print_ex(rdpSettings* settings,
arg = CommandLineFindArgumentA(largs, "smartcard-list");
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
settings->ListSmartcards = TRUE;
freerdp_smartcard_list(settings);
}
arg = CommandLineFindArgumentA(largs, "kbd-scancode-list");
@ -1872,10 +1873,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
{
settings->ListMonitors = enable;
}
CommandLineSwitchCase(arg, "smartcard-list")
{
settings->ListSmartcards = enable;
}
CommandLineSwitchCase(arg, "t")
{
if (!freerdp_settings_set_string(settings, FreeRDP_WindowTitle, arg->Value))

View File

@ -673,7 +673,6 @@ typedef struct
#define FreeRDP_ContainerName (1296)
#define FreeRDP_CspName (1297)
#define FreeRDP_PkinitAnchors (1298)
#define FreeRDP_ListSmartcards (1299)
#define FreeRDP_KerberosKdc (1344)
#define FreeRDP_KerberosRealm (1345)
#define FreeRDP_KerberosStartTime (1346)
@ -1174,8 +1173,7 @@ struct rdp_settings
ALIGN64 char* ContainerName; /* 1296 */
ALIGN64 char* CspName; /* 1297 */
ALIGN64 char* PkinitAnchors; /* 1298 */
ALIGN64 BOOL ListSmartcards; /* 1299 */
UINT64 padding1344[1344 - 1300]; /* 1300 */
UINT64 padding1344[1344 - 1299]; /* 1299 */
/* Kerberos Authentication */
ALIGN64 char* KerberosKdc; /* 1344 */

View File

@ -291,9 +291,6 @@ BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id)
case FreeRDP_ListMonitors:
return settings->ListMonitors;
case FreeRDP_ListSmartcards:
return settings->ListSmartcards;
case FreeRDP_LocalConnection:
return settings->LocalConnection;
@ -923,10 +920,6 @@ BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val)
settings->ListMonitors = cnv.c;
break;
case FreeRDP_ListSmartcards:
settings->ListSmartcards = cnv.c;
break;
case FreeRDP_LocalConnection:
settings->LocalConnection = cnv.c;
break;

View File

@ -100,7 +100,6 @@ static const struct settings_str_entry settings_map[] = {
{ FreeRDP_IgnoreCertificate, 0, "FreeRDP_IgnoreCertificate" },
{ FreeRDP_JpegCodec, 0, "FreeRDP_JpegCodec" },
{ FreeRDP_ListMonitors, 0, "FreeRDP_ListMonitors" },
{ FreeRDP_ListSmartcards, 0, "FreeRDP_ListSmartcards" },
{ FreeRDP_LocalConnection, 0, "FreeRDP_LocalConnection" },
{ FreeRDP_LogonErrors, 0, "FreeRDP_LogonErrors" },
{ FreeRDP_LogonNotify, 0, "FreeRDP_LogonNotify" },

View File

@ -89,7 +89,6 @@ static const size_t bool_list_indices[] = {
FreeRDP_IgnoreCertificate,
FreeRDP_JpegCodec,
FreeRDP_ListMonitors,
FreeRDP_ListSmartcards,
FreeRDP_LocalConnection,
FreeRDP_LogonErrors,
FreeRDP_LogonNotify,