From 7278f278c86816ceed4a5cdefd3bc086e9326a84 Mon Sep 17 00:00:00 2001 From: huangxin Date: Fri, 2 Dec 2022 14:42:37 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E6=9B=B4=E6=96=B0=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/libs/hardware/hardware.c | 4 ++-- srcs/libs/hardware/ipmltools.c | 22 +++++++++++----------- srcs/libs/include/agent_main.h | 2 +- srcs/libs/include/banner.h | 2 +- srcs/libs/include/cmdline.h | 2 +- srcs/libs/include/database.h | 2 +- srcs/libs/include/hardware.h | 2 +- srcs/libs/include/http_svr.h | 2 +- srcs/libs/include/init.h | 2 +- srcs/libs/include/msg_queue.h | 2 +- srcs/libs/include/task_manager.h | 2 +- srcs/libs/include/user_errno.h | 2 +- srcs/libs/include/uthash/utringbuffer.h | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/srcs/libs/hardware/hardware.c b/srcs/libs/hardware/hardware.c index 87caa11..4e06b18 100644 --- a/srcs/libs/hardware/hardware.c +++ b/srcs/libs/hardware/hardware.c @@ -62,7 +62,7 @@ int init_hardware() { * CPU_INFO json 格式化相关函数 ***************************************************************/ static cJSON *struct_to_json_CPU_DESC(void *pObj) { - PCPU_DESC pCpuDesc = (PCPU_DESC)pObj;//&((PCPU_INFO)pObj)->cpuCoreDesc; + PCPU_DESC pCpuDesc = (PCPU_DESC)pObj; //&((PCPU_INFO)pObj)->cpuCoreDesc; s2j_create_json_obj(pJsonObj); s2j_json_set_basic_element(pJsonObj, pCpuDesc, int, cpuSpeed); @@ -72,7 +72,7 @@ static cJSON *struct_to_json_CPU_DESC(void *pObj) { } static cJSON *struct_to_json_CPU_INFO(void *pObj) { - PCPU_INFO pCpuInfo = (PCPU_INFO)pObj;//&((PHARDWARE_INFO)pObj)->cpuInfo; + PCPU_INFO pCpuInfo = (PCPU_INFO)pObj; //&((PHARDWARE_INFO)pObj)->cpuInfo; s2j_create_json_obj(pJsonObj); s2j_json_set_basic_element(pJsonObj, pCpuInfo, int, nCores); diff --git a/srcs/libs/hardware/ipmltools.c b/srcs/libs/hardware/ipmltools.c index 450987b..57bb077 100644 --- a/srcs/libs/hardware/ipmltools.c +++ b/srcs/libs/hardware/ipmltools.c @@ -18,17 +18,17 @@ #define CMD_SENSOR_INFO ("ipmitool sensor") typedef struct { - char name[MAX_SENSOR_STR]; ///< 传感器名称 - char valUnit[MAX_SENSOR_STR];///< 传感器值单位 - char value[MAX_SENSOR_STR]; ///< 传感器值, >=0: 正常值, <0: 错误码 - char lnr[MAX_SENSOR_STR]; ///< Lower Non-Recoverable - char lc[MAX_SENSOR_STR]; ///< Lower Critical - char lnc[MAX_SENSOR_STR]; ///< Lower Non-Critical - char unc[MAX_SENSOR_STR]; ///< Upper Non-Critical - char uc[MAX_SENSOR_STR]; ///< Upper Critical - char unr[MAX_SENSOR_STR]; ///< Upper Non-Critical - char status[MAX_SENSOR_STR]; ///< 设备状态 0: failed, 1: Ok, and other - unsigned long timestamp; ///< 更新时间戳 + char name[MAX_SENSOR_STR]; ///< 传感器名称 + char valUnit[MAX_SENSOR_STR]; ///< 传感器值单位 + char value[MAX_SENSOR_STR]; ///< 传感器值, >=0: 正常值, <0: 错误码 + char lnr[MAX_SENSOR_STR]; ///< Lower Non-Recoverable + char lc[MAX_SENSOR_STR]; ///< Lower Critical + char lnc[MAX_SENSOR_STR]; ///< Lower Non-Critical + char unc[MAX_SENSOR_STR]; ///< Upper Non-Critical + char uc[MAX_SENSOR_STR]; ///< Upper Critical + char unr[MAX_SENSOR_STR]; ///< Upper Non-Critical + char status[MAX_SENSOR_STR]; ///< 设备状态 0: failed, 1: Ok, and other + unsigned long timestamp; ///< 更新时间戳 UT_hash_handle hh; } IPMI_SENSOR_INFO, *PIPMI_SENSOR_INFO; diff --git a/srcs/libs/include/agent_main.h b/srcs/libs/include/agent_main.h index 132ed96..b004235 100644 --- a/srcs/libs/include/agent_main.h +++ b/srcs/libs/include/agent_main.h @@ -5,4 +5,4 @@ #ifndef DAEMON_AGENT__AGENT_MAIN_H #define DAEMON_AGENT__AGENT_MAIN_H -#endif//DAEMON_AGENT__AGENT_MAIN_H +#endif //DAEMON_AGENT__AGENT_MAIN_H diff --git a/srcs/libs/include/banner.h b/srcs/libs/include/banner.h index d45bf2a..ac227f4 100644 --- a/srcs/libs/include/banner.h +++ b/srcs/libs/include/banner.h @@ -15,4 +15,4 @@ void banner_show(); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_BANNER_BANNER_H +#endif //DAEMON_AGENT_BANNER_BANNER_H diff --git a/srcs/libs/include/cmdline.h b/srcs/libs/include/cmdline.h index 3bb7c9c..7f138bc 100644 --- a/srcs/libs/include/cmdline.h +++ b/srcs/libs/include/cmdline.h @@ -13,4 +13,4 @@ int menu_run(int argc, char **argv); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_CMDLINE_H +#endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_CMDLINE_H diff --git a/srcs/libs/include/database.h b/srcs/libs/include/database.h index 147a194..ac0a096 100644 --- a/srcs/libs/include/database.h +++ b/srcs/libs/include/database.h @@ -15,4 +15,4 @@ void db_mysql_uninit(); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_DATABASE_H +#endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_DATABASE_H diff --git a/srcs/libs/include/hardware.h b/srcs/libs/include/hardware.h index 4029eaf..54d7fac 100644 --- a/srcs/libs/include/hardware.h +++ b/srcs/libs/include/hardware.h @@ -100,4 +100,4 @@ int get_sensor_info(PSENSOR_INFO pInfo); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_HARDWARE_H +#endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_HARDWARE_H diff --git a/srcs/libs/include/http_svr.h b/srcs/libs/include/http_svr.h index 34825e9..e0fbbf7 100644 --- a/srcs/libs/include/http_svr.h +++ b/srcs/libs/include/http_svr.h @@ -12,4 +12,4 @@ int http_svr_init(); #ifdef __cplusplus } #endif -#endif//VCPE_PROJECT_HTTP_SVR_H +#endif //VCPE_PROJECT_HTTP_SVR_H diff --git a/srcs/libs/include/init.h b/srcs/libs/include/init.h index fa2a1d2..bd82213 100644 --- a/srcs/libs/include/init.h +++ b/srcs/libs/include/init.h @@ -13,4 +13,4 @@ void user_uninit(); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_PROJECT_AGENT_INIT_INIT_H +#endif //DAEMON_AGENT_PROJECT_AGENT_INIT_INIT_H diff --git a/srcs/libs/include/msg_queue.h b/srcs/libs/include/msg_queue.h index ca4446b..4fa4ae2 100644 --- a/srcs/libs/include/msg_queue.h +++ b/srcs/libs/include/msg_queue.h @@ -27,4 +27,4 @@ void *get_mq_context(void); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_PROJECT_AGENT_MQ_MSG_QUEUE_H +#endif //DAEMON_AGENT_PROJECT_AGENT_MQ_MSG_QUEUE_H diff --git a/srcs/libs/include/task_manager.h b/srcs/libs/include/task_manager.h index 7f2c71d..6688e3a 100644 --- a/srcs/libs/include/task_manager.h +++ b/srcs/libs/include/task_manager.h @@ -23,4 +23,4 @@ int task_add_exit_event_handler(system_exit_cb cb, void *userdata); #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_TASK_TASK_MANAGER_H +#endif //DAEMON_AGENT_TASK_TASK_MANAGER_H diff --git a/srcs/libs/include/user_errno.h b/srcs/libs/include/user_errno.h index 0b475bb..853cb7a 100644 --- a/srcs/libs/include/user_errno.h +++ b/srcs/libs/include/user_errno.h @@ -89,4 +89,4 @@ typedef enum { #ifdef __cplusplus } #endif -#endif//DAEMON_AGENT_INCLUDE_USER_ERRNO_H +#endif //DAEMON_AGENT_INCLUDE_USER_ERRNO_H diff --git a/srcs/libs/include/uthash/utringbuffer.h b/srcs/libs/include/uthash/utringbuffer.h index 4b5772d..6bb6c4b 100644 --- a/srcs/libs/include/uthash/utringbuffer.h +++ b/srcs/libs/include/uthash/utringbuffer.h @@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include "utarray.h"// for "UT_icd" +#include "utarray.h" // for "UT_icd" typedef struct { unsigned i; /* index of next available slot; wraps at n */