1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd: Change the apptype from a string to an enum.

* scd/app-common.h (cardtype_t): New.
(apptype_t): New.
(struct app_ctx_s): Change type of field apptype.  Add fields
appversion and cardtype.  Adjust all app-*.c for the new type.
* scd/app.c (supported_app_list): New.
(strapptype): New.
(apptype_from_name): New.
(app_dump_state): Use strapptype.
(app_write_learn_status): Ditto.
(app_getattr): Ditto.
(check_conflict): Use apptype_from_name and integer comparison.
* scd/app-openpgp.c: Replace app->card_version by app->appversion.
--

This is another patch to make backporting from 2.3 easier.
This commit is contained in:
Werner Koch 2021-02-19 09:17:06 +01:00
parent 6380126b31
commit 43b3ec5aee
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
8 changed files with 108 additions and 26 deletions

View file

@ -4152,7 +4152,7 @@ app_select_p15 (app_t app)
}
if (!rc)
{
app->apptype = "P15";
app->apptype = APPTYPE_P15;
app->app_local = xtrycalloc (1, sizeof *app->app_local);
if (!app->app_local)