From 73dded036cdf7729a86f627718011f9ebad72642 Mon Sep 17 00:00:00 2001 From: xuyongliang_01 Date: Mon, 6 May 2024 03:15:49 +0000 Subject: [PATCH] update tool_lib/tool_lib.c. Signed-off-by: xuyongliang_01 --- tool_lib/tool_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool_lib/tool_lib.c b/tool_lib/tool_lib.c index 5c1a02d..f2d8057 100644 --- a/tool_lib/tool_lib.c +++ b/tool_lib/tool_lib.c @@ -247,7 +247,7 @@ int file_rollback(const char *cur_file, const char *backup_file, uint32_t file_m if (file_size > file_max_size) { ret = rename(cur_file, backup_file); if (ret != 0) { - HIKP_ERROR_PRINT("rename file(%s) fail, errno is %d\n", + HIKP_ERROR_PRINT("rename file(%s) failed, errno is %d\n", cur_file, errno); return -errno; } @@ -259,7 +259,7 @@ int file_rollback(const char *cur_file, const char *backup_file, uint32_t file_m fd = fopen(cur_file, "a+"); if (fd == NULL) { - HIKP_ERROR_PRINT("open %s fail, errno is %d\n", cur_file, errno); + HIKP_ERROR_PRINT("open %s failed, errno is %d\n", cur_file, errno); return -errno; } (void)chmod(cur_file, 0640); @@ -294,7 +294,7 @@ static int get_rand_str(char *str, int length) for (j = 0; j < RANDOM_NUM; j++) { size = read(fd, &r[j], sizeof(uint32_t)); if (size < 0) { - HIKP_ERROR_PRINT("read fd fail, errno is %d\n", errno); + HIKP_ERROR_PRINT("read fd failed, errno is %d\n", errno); close(fd); return -errno; } -- Gitee