From 6228628eec586a65a681a3f155699f704ab1ff73 Mon Sep 17 00:00:00 2001 From: Radoslaw Czerski Date: Fri, 12 Aug 2016 10:17:54 +0200 Subject: [PATCH] Missing function reverted. Change-Id: Icda621b3171b5a9b6136dd97a972e1b66e2e6a06 Signed-off-by: Radoslaw Czerski --- src/util.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/util.c b/src/util.c index 28492cb..c7757c8 100644 --- a/src/util.c +++ b/src/util.c @@ -519,6 +519,18 @@ char *util_get_real_path(char *special_path) return NULL; } +bool util_reserved_path_check(char *path) +{ + retvm_if(!path, 0, "path:%s", path); + + int i; + for (i = 0; i < ARRAY_SIZE(reserved_paths); ++i) + if(!strcmp(path, reserved_paths[i].path)) + return true; + + return false; +} + void util_start_noti_ani(icon_s *icon) { retm_if(icon == NULL, "Invalid parameter!"); @@ -584,6 +596,15 @@ char *util_safe_str(const char *str, const char *str_search) } +bool util_string_prefix_check(const char *prefix, const char *str) +{ + size_t lenpre = strlen(prefix); + size_t lenstr = strlen(str); + + return lenstr < lenpre ? false : !strncmp(prefix, str, lenpre); +} + + int util_dynamic_state_get(void) { int val = 0; -- 2.7.4