From 2883c17b1574d6688dd9dfd83486a487d10189d0 Mon Sep 17 00:00:00 2001 From: "viktor.tarasov" Date: Fri, 2 Jul 2010 13:46:13 +0000 Subject: [PATCH] pkcs15init: homogenize argument order of pkcs15init operations git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4507 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs15init/pkcs15-init.h | 10 +++++----- src/pkcs15init/pkcs15-lib.c | 10 +++++----- src/pkcs15init/pkcs15-oberthur.c | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/pkcs15init/pkcs15-init.h b/src/pkcs15init/pkcs15-init.h index 78d68ac8..7856f245 100644 --- a/src/pkcs15init/pkcs15-init.h +++ b/src/pkcs15init/pkcs15-init.h @@ -130,13 +130,13 @@ struct sc_pkcs15init_operations { /* * Support of pkcs15init emulation */ - int (*emu_update_dir) (struct sc_pkcs15_card *, struct sc_profile *, + int (*emu_update_dir) (struct sc_profile *, struct sc_pkcs15_card *, struct sc_app_info *); - int (*emu_update_any_df) (struct sc_pkcs15_card *, struct sc_profile *, + int (*emu_update_any_df) (struct sc_profile *, struct sc_pkcs15_card *, unsigned, struct sc_pkcs15_object *); - int (*emu_update_tokeninfo) (struct sc_pkcs15_card *, - struct sc_profile *, struct sc_pkcs15_tokeninfo *); - int (*emu_write_info)(struct sc_pkcs15_card *, struct sc_profile *, + int (*emu_update_tokeninfo) (struct sc_profile *, struct sc_pkcs15_card *, + struct sc_pkcs15_tokeninfo *); + int (*emu_write_info)(struct sc_profile *, struct sc_pkcs15_card *, struct sc_pkcs15_object *); }; diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c index a245e9f9..c0a2aebd 100644 --- a/src/pkcs15init/pkcs15-lib.c +++ b/src/pkcs15init/pkcs15-lib.c @@ -2327,7 +2327,7 @@ sc_pkcs15init_update_dir(struct sc_pkcs15_card *p15card, SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_NORMAL); if (profile->ops->emu_update_dir) { - r = profile->ops->emu_update_dir(p15card, profile, app); + r = profile->ops->emu_update_dir(profile, p15card, app); SC_FUNC_RETURN(ctx, SC_LOG_DEBUG_NORMAL, r); } @@ -2425,7 +2425,7 @@ sc_pkcs15init_update_tokeninfo(struct sc_pkcs15_card *p15card, tokeninfo.preferred_language = p15card->preferred_language; if (profile->ops->emu_update_tokeninfo) - return profile->ops->emu_update_tokeninfo(p15card, profile, &tokeninfo); + return profile->ops->emu_update_tokeninfo(profile, p15card, &tokeninfo); r = sc_pkcs15_encode_tokeninfo(card->ctx, &tokeninfo, &buf, &size); if (r >= 0) @@ -2557,7 +2557,7 @@ sc_pkcs15init_add_object(struct sc_pkcs15_card *p15card, } if (profile->ops->emu_update_any_df) - r = profile->ops->emu_update_any_df(p15card, profile, SC_AC_OP_CREATE, object); + r = profile->ops->emu_update_any_df(profile, p15card, SC_AC_OP_CREATE, object); else r = sc_pkcs15init_update_any_df(p15card, profile, df, is_new); @@ -2737,7 +2737,7 @@ sc_pkcs15init_delete_object(struct sc_pkcs15_card *p15card, struct sc_profile *p } if (profile->ops->emu_update_any_df) { - r = profile->ops->emu_update_any_df(p15card, profile, SC_AC_OP_ERASE, obj); + r = profile->ops->emu_update_any_df(profile, p15card, SC_AC_OP_ERASE, obj); SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, r, "'ERASE' update DF failed"); } @@ -3640,7 +3640,7 @@ sc_pkcs15init_write_info(struct sc_pkcs15_card *p15card, int n, r; if (profile->ops->emu_write_info) - return profile->ops->emu_write_info(p15card, profile, pin_obj); + return profile->ops->emu_write_info(profile, p15card, pin_obj); memset(buffer, 0, sizeof(buffer)); diff --git a/src/pkcs15init/pkcs15-oberthur.c b/src/pkcs15init/pkcs15-oberthur.c index 79e7a168..aae5919b 100644 --- a/src/pkcs15init/pkcs15-oberthur.c +++ b/src/pkcs15init/pkcs15-oberthur.c @@ -784,8 +784,8 @@ cosm_store_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card, static int -cosm_emu_update_dir (struct sc_pkcs15_card *p15card, - struct sc_profile *profile, struct sc_app_info *info) +cosm_emu_update_dir (struct sc_profile *profile, struct sc_pkcs15_card *p15card, + struct sc_app_info *info) { SC_FUNC_CALLED(p15card->card->ctx, 1); /* No DIR file in the native Oberthur card */ @@ -794,7 +794,7 @@ cosm_emu_update_dir (struct sc_pkcs15_card *p15card, static int -cosm_emu_update_any_df(struct sc_pkcs15_card *p15card, struct sc_profile *profile, +cosm_emu_update_any_df(struct sc_profile *profile, struct sc_pkcs15_card *p15card, unsigned op, struct sc_pkcs15_object *object) { struct sc_context *ctx = p15card->card->ctx; @@ -818,7 +818,7 @@ cosm_emu_update_any_df(struct sc_pkcs15_card *p15card, struct sc_profile *profil static int -cosm_emu_update_tokeninfo(struct sc_pkcs15_card *p15card, struct sc_profile *profile, +cosm_emu_update_tokeninfo(struct sc_profile *profile, struct sc_pkcs15_card *p15card, struct sc_pkcs15_tokeninfo *tinfo) { struct sc_context *ctx = p15card->card->ctx; @@ -867,8 +867,8 @@ cosm_emu_update_tokeninfo(struct sc_pkcs15_card *p15card, struct sc_profile *pro static int -cosm_emu_write_info(struct sc_pkcs15_card *p15card, - struct sc_profile *profile, struct sc_pkcs15_object *pin_obj) +cosm_emu_write_info(struct sc_profile *profile, struct sc_pkcs15_card *p15card, + struct sc_pkcs15_object *pin_obj) { SC_FUNC_CALLED(p15card->card->ctx, 1); /* No OpenSC Info file in the native Oberthur card */