zkey: Generalize the adapter serial number handling

Different crypto card types use different serial number formats.
Generalize the handling of serial numbers so that the majority of the
code does not have to care about the card type when dealing with it.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2019-11-18 12:45:34 +01:00
committed by Jan Höppner
parent ce4704f365
commit d91e728e3c
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -558,7 +558,7 @@ int select_cca_adapter(struct cca_lib *cca, int card, int domain, bool verbose)
{
unsigned int adapters, adapter;
char adapter_serialnr[9];
char apqn_serialnr[9];
char apqn_serialnr[SERIALNR_LENGTH];
char temp[10];
int rc, found = 0;