From c4ef31d1ea7a42cf5492ca847c30be15c71c61c0 Mon Sep 17 00:00:00 2001 From: Suchang Woo Date: Thu, 16 Jul 2015 22:06:57 +0900 Subject: [PATCH] vconf-compat: add vconf_get_ext_errno Change-Id: I1b04c6c3d8e785df6eb319e90aa34967c2253530 Signed-off-by: Suchang Woo --- vconf-compat/vconf.c | 5 +++++ vconf-compat/vconf.h | 15 +++++++++++++++ vconf-compat/vconf.sym | 1 + 3 files changed, 21 insertions(+) diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c index 198c5fb..a99cd72 100644 --- a/vconf-compat/vconf.c +++ b/vconf-compat/vconf.c @@ -726,3 +726,8 @@ EXPORT int vconf_get_dbl(const char *key, double *dblval) return 0; } +int vconf_get_ext_errno(void) +{ + return errno * -1; +} + diff --git a/vconf-compat/vconf.h b/vconf-compat/vconf.h index c43d345..45a4156 100644 --- a/vconf-compat/vconf.h +++ b/vconf-compat/vconf.h @@ -19,12 +19,19 @@ #ifndef __VCONF_H__ #define __VCONF_H__ +#include + #include "vconf-keys.h" #ifdef __cplusplus extern "C" { #endif +#define VCONF_OK 0 +#define VCONF_ERROR -1 +#define VCONF_ERROR_FILE_NO_ENT -ENOENT +#define VCONF_ERROR_FILE_PERM -EPERM + enum vconf_t { VCONF_TYPE_NONE = 0, /**< Vconf none type for Error detection */ VCONF_TYPE_STRING = 40, /**< Vconf string type */ @@ -212,6 +219,14 @@ char *vconf_get_str(const char *key); */ int vconf_get_dbl(const char *key, double *dblval); +/** + * Get an error code of the last API call + * + * @return error code + * @deprecated use buxton APIs + */ +int vconf_get_ext_errno(void); + #ifdef __cplusplus } #endif diff --git a/vconf-compat/vconf.sym b/vconf-compat/vconf.sym index a76ac2e..7f81f43 100644 --- a/vconf-compat/vconf.sym +++ b/vconf-compat/vconf.sym @@ -16,6 +16,7 @@ VCONF_BUXTON_1.0 { vconf_get_bool; vconf_get_str; vconf_get_dbl; + vconf_get_ext_errno; local: *; }; -- 2.7.4