]> err.no Git - yubikey-personalization.old/commitdiff
Add a function to fetch the core configuration from the ykpers configuration
authorlevitte@gmail.com <levitte@gmail.com@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Tue, 30 Jun 2009 09:56:01 +0000 (09:56 +0000)
committerlevitte@gmail.com <levitte@gmail.com@b62f149e-849f-11dd-9899-c7ba65f7c4c7>
Tue, 30 Jun 2009 09:56:01 +0000 (09:56 +0000)
git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@109 b62f149e-849f-11dd-9899-c7ba65f7c4c7

ykpers.c
ykpers.h

index 26b61eec7ded527c5472353a7528d823370c4b92..72b257478167fbc8b5087b2b292d0f8049c94476 100644 (file)
--- 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;
index 6e0dc8f16cbda9231d9427de184df02f0879d748..9c676dd549fc7f3f8203ea2df5607b4a3d6c38e8 100644 (file)
--- 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);