pkcs15init: homogenize argument order of pkcs15init operations

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4507 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
viktor.tarasov 2010-07-02 13:46:13 +00:00
parent 765ea98cfb
commit 2883c17b15
3 changed files with 16 additions and 16 deletions

View File

@ -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 *);
};

View File

@ -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));

View File

@ -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 */