Replace prefix 'libsys' with 'syscommon' 63/296263/1
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 24 Jul 2023 11:25:11 +0000 (20:25 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 24 Jul 2023 11:52:38 +0000 (20:52 +0900)
Change-Id: Ibe92ea978eb95b6a2f470dae7195b2840dd7c2d5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
include/libsyscommon/common.h
include/libsyscommon/file.h
include/libsyscommon/ini-parser.h
src/libcommon/common.c
src/libcommon/file.c
src/libcommon/ini-parser.c

index 8144929..7fd6f66 100644 (file)
@@ -20,8 +20,8 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE. */
 
-#ifndef __LIBCOMMON_COMMON_H__
-#define __LIBCOMMON_COMMON_H__
+#ifndef __SYSCOMMON_COMMON_H__
+#define __SYSCOMMON_COMMON_H__
 
 #include <stdbool.h>
 
@@ -34,17 +34,17 @@ extern "C" {
  *
  * @return true if running on emulator, otherwise false even on operation failure
  */
-bool libsys_is_emulator(void);
+bool syscommon_is_emulator(void);
 
 /**
  * @brief Check if running on container
  *
  * @return true if running on container, otherwise false even on operation failure
  */
-bool libsys_is_container(void);
+bool syscommon_is_container(void);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __LIBCOMMON_COMMON_H__ */
+#endif /* __SYSCOMMON_COMMON_H__ */
index c933fc9..5c038e6 100644 (file)
@@ -99,7 +99,7 @@ int sys_set_str(char *fname, char *val);
  *
  * @return zero if cannot read else the number of matched and assigned items
  */
-int libsys_parse_cmdline_scanf(const char *format, ...);
+int syscommon_parse_cmdline_scanf(const char *format, ...);
 
 #ifdef __cplusplus
 }
index 9620103..ce9e8ad 100644 (file)
@@ -69,7 +69,7 @@ int config_parse(const char *file_name, int cb(struct parse_result *result,
  * @param[in] user_data user data is passed to cb.
  * @return 0 on success, negative if failed
  */
-int libsys_config_parse_by_section(const char *file_name, int cb(const struct parse_result *,  void *), void *user_data);
+int syscommon_config_parse_by_section(const char *file_name, int cb(const struct parse_result *, void *), void *user_data);
 
 #ifdef __cplusplus
 }
index 051f8bb..2e96f29 100644 (file)
@@ -32,7 +32,7 @@
 #define FEATURE_MODEL_NAME_EMULATOR   "Emulator"
 #define CONTAINER_FILE_PATH           "/run/systemd/container"
 
-bool libsys_is_emulator(void)
+bool syscommon_is_emulator(void)
 {
        int ret = 0;
        char *model_name = NULL;
@@ -44,7 +44,7 @@ bool libsys_is_emulator(void)
 
        ret = system_info_get_platform_string(FEATURE_MODEL_NAME, &model_name);
        if (ret < 0) {
-               _E("Cannot get model name: %d, libsys_is_emulator() returns false on operation failure", ret);
+               _E("Cannot get model name: %d, syscommon_is_emulator() returns false on operation failure", ret);
                return false;
        }
 
@@ -57,7 +57,7 @@ bool libsys_is_emulator(void)
        return is_emul;
 }
 
-bool libsys_is_container(void)
+bool syscommon_is_container(void)
 {
        static bool is_container = false;
        static bool is_cached = false;
index c2f579d..6c6cbaf 100644 (file)
@@ -138,7 +138,7 @@ int sys_set_str(char *fname, char *val)
        return 0;
 }
 
-int libsys_parse_cmdline_scanf(const char *format, ...)
+int syscommon_parse_cmdline_scanf(const char *format, ...)
 {
        FILE *fp = NULL;
        char *token = NULL;
index 19355d2..0a4960a 100644 (file)
@@ -157,7 +157,7 @@ static void free_data(gpointer data)
        free(data);
 }
 
-int libsys_config_parse_by_section(const char *fname, int cb(const struct parse_result *, void *), void *user_data)
+int syscommon_config_parse_by_section(const char *fname, int cb(const struct parse_result *, void *), void *user_data)
 {
        FILE *fp = NULL;
        char *line = NULL;