osu: Add module name as prefix to exported functions 50/316050/4
authorUnsung Lee <unsung.lee@samsung.com>
Mon, 9 Dec 2024 08:44:28 +0000 (17:44 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 2 Jan 2025 09:57:40 +0000 (18:57 +0900)
Add module name as prefix to exported functions.
For example, do_get_board_param() is changed to board_params_getter_do_get_board_param()
by adding prefix of module name (board-params-getter.c).
In addition, add 'static' to function which is not exported to other files.

Change-Id: I8f38d530d13ec7ca8ca6a5b1bd76108b390c2468
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
tools/osu/board-params-getter.c
tools/osu/board-params-getter.h
tools/osu/board-params-setter.c
tools/osu/board-params-setter.h
tools/osu/osu.c
tools/osu/resize.c
tools/osu/resize.h
tools/osu/update.c
tools/osu/update.h

index 425099b401f80c4d8b1714743deb7b4f1362cb77..929aea9fe4cd4cdf8ef5701bf5b9449563b6b90d 100644 (file)
@@ -178,7 +178,7 @@ static void print_board_param_getters(void)
                " * e.g. \"partition-status,a\"\n");
 }
 
-int do_get_board_param(const char *params_str)
+int board_params_getter_get_board_param(const char *params_str)
 {
        int ret = 0;
        char *params_str_dup = NULL;
index 194528c58fb61b5b4c406a8831b54ff2f7be0aa4..a39821ab469815bd676596f801808012f96a0a65 100644 (file)
@@ -16,4 +16,4 @@
 
 #pragma once
 
-int do_get_board_param(const char *param_name);
+int board_params_getter_get_board_param(const char *param_name);
index 1ea762b3fa24c5968f891ec67ee59b003e7dc65f..3bd2b5c369e727f223ede840b50d7a7ea78f2c6f 100644 (file)
@@ -166,7 +166,7 @@ static void print_board_param_setters(void)
                " * e.g. \"upgrade_progress_status,100\"\n");
 }
 
-int do_set_board_param(const char *params_str)
+int board_params_setter_set_board_param(const char *params_str)
 {
        int ret = 0;
        char *params_str_dup = NULL;
index 84cc3e2f1d650a9c7c3c3cf21f83b32cf8360726..1300c7860766335342ee1cbb8bad497fdafee8b2 100644 (file)
@@ -16,4 +16,4 @@
 
 #pragma once
 
-int do_set_board_param(const char *param_name);
+int board_params_setter_set_board_param(const char *param_name);
index 73f32182b39cdc64fdfe08000b0e33c31b6dedda..3ef80b867f5b9e94963e7632dc4ed329ec88480f 100644 (file)
@@ -141,16 +141,16 @@ int main(int argc, char **argv)
        }
 
        if (args.resize)
-               return do_resize();
+               return resize_do_resize();
 
        if (args.update)
-               return do_update(args.online);
+               return update_do_update(args.online);
 
        if (args.get_board_param)
-               return do_get_board_param(args.board_param);
+               return board_params_getter_get_board_param(args.board_param);
 
        if (args.set_board_param)
-               return do_set_board_param(args.board_param);
+               return board_params_setter_set_board_param(args.board_param);
 
        print_help(argv[0]);
 
index dc99f99261efe4e4dfaece59e93e1f5df6ef8cf0..bf73affa8ae43a62803c5cba2f8cf07c15a381f5 100644 (file)
@@ -145,7 +145,7 @@ static int resize_mount_point(const char *device_mount_point)
        return ret;
 }
 
-int do_resize()
+int resize_do_resize()
 {
        int ret = 0;
        ret = resize_mount_point("/");
index 8c9894d05c8a88039787e859b79330ce099a6b97..8508ef7522a93a912fbbcdc0803167c612eaa64b 100644 (file)
@@ -16,4 +16,4 @@
 
 #pragma once
 
-int do_resize();
+int resize_do_resize();
index 3de3a6afb79345d5c3e76d7ab6f39d73cf0385c8..b155fb969b1fa94abbad6ed72e700f4d622b9d14 100644 (file)
@@ -8,7 +8,7 @@
 #define UPDATE_TYPE_ONLINE "online"
 #define UPDATE_TYPE_OFFLINE "offline"
 
-int set_update_type(bool online)
+static int set_update_type(bool online)
 {
        char *type;
        if (online) {
@@ -19,7 +19,7 @@ int set_update_type(bool online)
        return hal_device_board_set_upgrade_type(type);
 }
 
-int do_update(bool online)
+int update_do_update(bool online)
 {
        int ret = 0;
        int ret_deinit = 0;
index df95c4559395fb7f60bc17801e59624ff6f01b34..6a6d6efe4f99aa1c0696848bffbb6aa54a07f379 100644 (file)
@@ -17,4 +17,4 @@
 #pragma once
 #include <stdbool.h>
 
-int do_update(bool online);
+int update_do_update(bool online);