From: levitte@gmail.com Date: Tue, 30 Jun 2009 09:56:01 +0000 (+0000) Subject: Add a function to fetch the core configuration from the ykpers configuration X-Git-Tag: yubikey-personalisation_0.97-1~63 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d091158dc2fb7f08696812e0abcbe5f9723886b;p=yubikey-personalization.old 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 --- 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);