summaryrefslogtreecommitdiff
path: root/src/device_manager_plugin_exynos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device_manager_plugin_exynos.c')
-rw-r--r--src/device_manager_plugin_exynos.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/device_manager_plugin_exynos.c b/src/device_manager_plugin_exynos.c
index d95d31a..4a13376 100644
--- a/src/device_manager_plugin_exynos.c
+++ b/src/device_manager_plugin_exynos.c
@@ -29,6 +29,7 @@
#define BUFF_MAX 255
#define MAX_NAME 255
+#if 0
#define GENERATE_ACCESSORS_CHAR_RW(_suffix, _item) \
char *OEM_sys_get_##_suffix() \
{ \
@@ -51,6 +52,7 @@ int OEM_sys_set_##_suffix(char *str) \
{ \
return sys_set_str(_item, str); \
}
+#endif
/* TODO: Add APIs has (char *) params */
@@ -670,13 +672,13 @@ static char *health_text[] = {
int OEM_sys_get_battery_health(int *value)
{
- char *buf;
+ char buf[BUFF_MAX] = {0};
+ int ret = 0;
int i = 0;
- buf = sys_get_str(BATTERY_HEALTH_PATH);
- if (NULL == buf) {
+ ret = sys_get_str(BATTERY_HEALTH_PATH, buf);
+ if (ret == -1)
return -1;
- }
for (i = 0; i < BATTERY_HEALTH_MAX; i++) {
if (strncmp(buf, health_text[i], strlen(health_text[i])) == 0) {
@@ -731,12 +733,12 @@ static int OEM_sys_muic_node_path_info()
int OEM_sys_get_uart_path(int *value)
{
- char *buf;
+ char buf[BUFF_MAX] = {0};
+ int ret = 0;
- buf = sys_get_str(uart_node_path);
- if (NULL == buf) {
+ ret = sys_get_str(uart_node_path, buf);
+ if (ret == -1)
return -1;
- }
if (strncmp(buf, "CP", 2) == 0) {
*value = PATH_CP;
@@ -764,12 +766,12 @@ int OEM_sys_set_uart_path(int value)
int OEM_sys_get_usb_path(int *value)
{
- char *buf;
+ char buf[BUFF_MAX] = {0};
+ int ret = 0;
- buf = sys_get_str(usb_node_path);
- if (NULL == buf) {
+ ret = sys_get_str(usb_node_path, buf);
+ if (ret == -1)
return -1;
- }
if (strncmp(buf, "PDA", 3) == 0) {
*value = PATH_AP;