Home GnuPG
Diffusion GnuPG 43b3ec5aee40

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

Description

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.

Details

Provenance
wernerAuthored on Feb 19 2021, 9:17 AM
Parents
rG6380126b31aa: scd: Add some compatibility code for easier backporting.
Branches
Unknown
Tags
Unknown