From 0d091158dc2fb7f08696812e0abcbe5f9723886b Mon Sep 17 00:00:00 2001 From: "levitte@gmail.com" Date: Tue, 30 Jun 2009 09:56:01 +0000 Subject: [PATCH] Add a function to fetch the core configuration from the ykpers configuration git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@109 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- ykpers.c | 8 ++++++++ ykpers.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ykpers.c b/ykpers.c index 26b61ee..72b2574 100644 --- a/ykpers.c +++ b/ykpers.c @@ -406,6 +406,14 @@ int ykp_read_config(YKP_CONFIG *cfg, return 0; } +YK_CONFIG *ykp_core_config(YKP_CONFIG *cfg) +{ + if (cfg) + return &cfg->ykcore_config; + ykp_errno = YKP_ENOCFG; + return 0; +} + int * const _ykp_errno_location(void) { static int tsd_init = 0; diff --git a/ykpers.h b/ykpers.h index 6e0dc8f..9c676dd 100644 --- a/ykpers.h +++ b/ykpers.h @@ -77,6 +77,8 @@ int ykp_read_config(YKP_CONFIG *cfg, void *userdata), void *userdata); +YK_CONFIG *ykp_core_config(YKP_CONFIG *cfg); + extern int * const _ykp_errno_location(void); #define ykp_errno (*_ykp_errno_location()) const char *ykp_strerror(int errnum); -- 2.39.5