From 79506b5bd26eeacd838701eeaf116831e3c19911 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Thu, 19 Oct 2023 06:53:15 +0000
Subject: [PATCH 148/181] !2214 imporove isula_rt_opts code * imporove
 isula_rt_opts code

---
 .../modules/runtime/isula/isula_rt_ops.c      | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
index a0c7ac29..6c5d809e 100644
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
@@ -1364,7 +1364,7 @@ int rt_isula_status(const char *id, const char *runtime, const rt_status_params_
 
     ret = snprintf(workdir, sizeof(workdir), "%s/%s", params->state, id);
     if (ret < 0 || (size_t)ret >= sizeof(workdir)) {
-        ERROR("failed join full workdir %s/%s", params->rootpath, id);
+        ERROR("Failed join full workdir %s/%s", params->state, id);
         goto out;
     }
 
@@ -1600,7 +1600,7 @@ int rt_isula_resources_stats(const char *id, const char *runtime, const rt_stats
 
     ret = snprintf(workdir, sizeof(workdir), "%s/%s", params->state, id);
     if (ret < 0 || (size_t)ret >= sizeof(workdir)) {
-        ERROR("failed join full workdir %s/%s", params->rootpath, id);
+        ERROR("Failed join full workdir %s/%s", params->state, id);
         goto out;
     }
 
@@ -1633,44 +1633,44 @@ int rt_isula_exec_resize(const char *id, const char *runtime, const rt_exec_resi
     int ret = 0;
 
     if (id == NULL || runtime == NULL || params == NULL) {
-        ERROR("nullptr arguments not allowed");
+        ERROR("Nullptr arguments not allowed");
         return -1;
     }
 
     /* crictl not suport exec auto resize */
     if (params->suffix == NULL) {
-        WARN("exec resize not support when isula not being used");
+        WARN("Exec resize not support when isula not being used");
         return 0;
     }
 
     ret = snprintf(workdir, sizeof(workdir), "%s/%s/exec/%s", params->state, id, params->suffix);
     if (ret < 0 || (size_t)ret >= sizeof(workdir)) {
-        ERROR("failed join full workdir %s/%s", params->rootpath, id);
-        goto out;
+        ERROR("Failed to join exec resize workdir path");
+        return -1;
     }
 
     ret = snprintf(resize_fifo_path, sizeof(resize_fifo_path), "%s/%s", workdir, RESIZE_FIFO_NAME);
     if (ret < 0 || (size_t)ret >= sizeof(resize_fifo_path)) {
-        ERROR("failed to join exec fifo path");
+        ERROR("Failed to join resize fifo path");
         return -1;
     }
 
     ret = snprintf(data, sizeof(data), "%u %u", params->width, params->height);
     if (ret < 0 || (size_t)ret >= sizeof(data)) {
-        ERROR("failed to write resize data");
+        ERROR("Failed to write resize data");
         return -1;
     }
 
     fd = util_open(resize_fifo_path, O_WRONLY | O_NONBLOCK, 0);
     if (fd == -1) {
-        ERROR("open exec resize fifo error");
+        ERROR("Open exec resize fifo error");
         ret = -1;
         goto out;
     }
 
     count = util_write_nointr(fd, data, strlen(data));
     if (count < 0 || (size_t)count != strlen(data)) {
-        ERROR("write exec resize data error");
+        ERROR("Write exec resize data error");
         ret = -1;
         goto out;
     }
@@ -1683,7 +1683,7 @@ int rt_isula_exec_resize(const char *id, const char *runtime, const rt_exec_resi
     }
 
     if (kill(pid, SIGWINCH) < 0) {
-        SYSERROR("can't kill process (pid=%d) with signal %u", pid, SIGWINCH);
+        SYSERROR("Can't kill process (pid=%d) with signal %u", pid, SIGWINCH);
         ret = -1;
         goto out;
     }
-- 
2.42.0

