From f5cc569f0846472dbab51d8e304ae2b6848d03c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sat, 10 May 2025 20:51:05 +0800 Subject: [PATCH 1/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 83 +++++++++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 15 deletions(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index 74741e141..1962c0256 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "securec.h" #include "parameter.h" @@ -41,6 +42,15 @@ #define MALLOPT_PARA_CNT 2 #define INVALID_PRIORITY "0" +typedef struct { + int hostId; + char *hostName; + int schedPriority; + int processPriority; + int malloptKey; + int malloptValue; +} HostConfig; + static void StartMemoryHook(const char* processName) { const char defaultValue[PARAM_BUF_LEN] = { 0 }; @@ -143,32 +153,75 @@ static void SetMallopt(int argc, char **argv) return; } +static int ParseCommandLineArgs(int argc, char **argv, HostConfig *config) +{ + int opt; + while ((opt = getopt(argc, argv, "i:n:p:s:m:v:")) != -1) { + switch (opt) { + case 'i': + if (!HdfStringToInt(optarg, &config->hostId)) { + HDF_LOGE("Invalid process ID: %{public}s", optarg); + return HDF_ERR_INVALID_PARAM; + } + break; + case 'n': + config->hostName = optarg; + break; + case 'p': + if (!HdfStringToInt(optarg, &config->schedPriority)) { + HDF_LOGE("Invalid process priority: %{public}s", optarg); + return HDF_ERR_INVALID_PARAM; + } + break; + case 's': + if (!HdfStringToInt(optarg, &config->processPriority)) { + HDF_LOGE("Invalid process priority: %{public}s", optarg); + return HDF_ERR_INVALID_PARAM; + } + break; + case 'm': + if (!HdfStringToInt(optarg, &config->malloptKey)) { + HDF_LOGE("Invalid mallopt key: %{public}s", optarg); + return HDF_ERR_INVALID_PARAM; + } + break; + case 'v': + if (!HdfStringToInt(optarg, &config->malloptValue)) { + HDF_LOGE("Invalid mallopt value: %{public}s", optarg); + return HDF_ERR_INVALID_PARAM; + } + break; + default: + HDF_LOGE("Unknown option: -%c", opt); + return HDF_ERR_INVALID_PARAM; + } + } + return HDF_SUCCESS; +} + int main(int argc, char **argv) { - if (argc < DEVHOST_MIN_INPUT_PARAM_NUM) { - HDF_LOGE("Devhost main parameter error, argc: %{public}d", argc); + HostConfig config = {0}; + if (ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS) { + printf("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); return HDF_ERR_INVALID_PARAM; } prctl(PR_SET_PDEATHSIG, SIGKILL); // host process should exit with devmgr process - int hostId = 0; - if (!HdfStringToInt(argv[DEVHOST_INPUT_PARAM_HOSTID_POS], &hostId)) { - HDF_LOGE("Devhost main parameter error, argv[1]: %{public}s", argv[DEVHOST_INPUT_PARAM_HOSTID_POS]); - return HDF_ERR_INVALID_PARAM; - } + int hostId = config.hostId; - const char *hostName = argv[DEVHOST_HOST_NAME_POS]; + const char *hostName = config.hostName; HDF_LOGI("hdf device host %{public}s %{public}d start", hostName, hostId); SetProcTitle(argv, hostName); StartMemoryHook(hostName); - if ((strcmp(argv[DEVHOST_PROCESS_PRI_POS], INVALID_PRIORITY) != 0) && - (strcmp(argv[DEVHOST_THREAD_PRI_POS], INVALID_PRIORITY) != 0)) { - HdfSetProcPriority(argv); - } - if (argc > DEVHOST_MIN_INPUT_PARAM_NUM) { - SetMallopt(argc, argv); - } +// if ((strcmp(argv[DEVHOST_PROCESS_PRI_POS], INVALID_PRIORITY) != 0) && +// (strcmp(argv[DEVHOST_THREAD_PRI_POS], INVALID_PRIORITY) != 0)) { +// HdfSetProcPriority(argv); +// } +// if (argc > DEVHOST_MIN_INPUT_PARAM_NUM) { +// SetMallopt(argc, argv); +// } struct IDevHostService *instance = DevHostServiceNewInstance(hostId, hostName); if (instance == NULL || instance->StartService == NULL) { -- Gitee From 7947f05fcd37cc541e183b4b0844f4219787c3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sat, 10 May 2025 21:40:15 +0800 Subject: [PATCH 2/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 64 ++++++++++++++---------------------- 1 file changed, 24 insertions(+), 40 deletions(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index 1962c0256..2c7fae966 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -101,19 +101,19 @@ static void SetProcTitle(char **argv, const char *newTitle) prctl(PR_SET_NAME, newTitle); } -static void HdfSetProcPriority(char **argv) +static void HdfSetProcPriority(int32_t procPriority, int32_t schedPriority) { - int32_t schedPriority = 0; - int32_t procPriority = 0; - - if (!HdfStringToInt(argv[DEVHOST_PROCESS_PRI_POS], &procPriority)) { - HDF_LOGE("procPriority parameter error: %{public}s", argv[DEVHOST_PROCESS_PRI_POS]); - return; - } - if (!HdfStringToInt(argv[DEVHOST_THREAD_PRI_POS], &schedPriority)) { - HDF_LOGE("schedPriority parameter error: %{public}s", argv[DEVHOST_THREAD_PRI_POS]); - return; - } +// int32_t schedPriority = 0; +// int32_t procPriority = 0; +// +// if (!HdfStringToInt(argv[DEVHOST_PROCESS_PRI_POS], &procPriority)) { +// HDF_LOGE("procPriority parameter error: %{public}s", argv[DEVHOST_PROCESS_PRI_POS]); +// return; +// } +// if (!HdfStringToInt(argv[DEVHOST_THREAD_PRI_POS], &schedPriority)) { +// HDF_LOGE("schedPriority parameter error: %{public}s", argv[DEVHOST_THREAD_PRI_POS]); +// return; +// } if (setpriority(PRIO_PROCESS, 0, procPriority) != 0) { HDF_LOGE("host setpriority failed: %{public}d", errno); @@ -128,29 +128,14 @@ static void HdfSetProcPriority(char **argv) } } -static void SetMallopt(int argc, char **argv) +static void SetMallopt(int32_t malloptKey, int32_t malloptValue) { - for (int i = DEVHOST_MIN_INPUT_PARAM_NUM; i < argc - 1; i += MALLOPT_PARA_CNT) { - int32_t malloptKey = 0; - int32_t malloptValue = 0; - int ret = 0; - if (!HdfStringToInt(argv[i], &malloptKey)) { - HDF_LOGE("malloptKey parameter error:%{public}s", argv[i]); - continue; - } - if (!HdfStringToInt(argv[i + 1], &malloptValue)) { - HDF_LOGE("malloptValue parameter error:%{public}s", argv[i + 1]); - continue; - } - ret = mallopt(malloptKey, malloptValue); - if (ret != 1) { - HDF_LOGE("mallopt failed, malloptKey:%{public}d, malloptValue:%{public}d, ret:%{public}d", - malloptKey, malloptValue, ret); - continue; - } - HDF_LOGI("host set mallopt succeed, mallopt:%{public}d %{public}d", malloptKey, malloptValue); + int ret = mallopt(malloptKey, malloptValue); + if (ret != 1) { + HDF_LOGE("mallopt failed, malloptKey:%{public}d, malloptValue:%{public}d, ret:%{public}d", + malloptKey, malloptValue, ret); } - return; + HDF_LOGI("host set mallopt succeed, mallopt:%{public}d %{public}d", malloptKey, malloptValue); } static int ParseCommandLineArgs(int argc, char **argv, HostConfig *config) @@ -215,13 +200,12 @@ int main(int argc, char **argv) HDF_LOGI("hdf device host %{public}s %{public}d start", hostName, hostId); SetProcTitle(argv, hostName); StartMemoryHook(hostName); -// if ((strcmp(argv[DEVHOST_PROCESS_PRI_POS], INVALID_PRIORITY) != 0) && -// (strcmp(argv[DEVHOST_THREAD_PRI_POS], INVALID_PRIORITY) != 0)) { -// HdfSetProcPriority(argv); -// } -// if (argc > DEVHOST_MIN_INPUT_PARAM_NUM) { -// SetMallopt(argc, argv); -// } + if ((config.processPriority != 0) && (config.schedPriority != 0)) { + HdfSetProcPriority(config.processPriority, config.schedPriority); + } + if ((config.malloptKey != 0) && (config.malloptValue != 0)) { + SetMallopt(config.malloptKey, config.malloptValue); + } struct IDevHostService *instance = DevHostServiceNewInstance(hostId, hostName); if (instance == NULL || instance->StartService == NULL) { -- Gitee From 4b3696e0a3001a72036da23ff4f963b43810e51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sat, 10 May 2025 21:56:29 +0800 Subject: [PATCH 3/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- framework/tools/hc-gen/src/startup_cfg_gen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/tools/hc-gen/src/startup_cfg_gen.cpp b/framework/tools/hc-gen/src/startup_cfg_gen.cpp index ec219cb9f..d88b9311d 100644 --- a/framework/tools/hc-gen/src/startup_cfg_gen.cpp +++ b/framework/tools/hc-gen/src/startup_cfg_gen.cpp @@ -109,8 +109,9 @@ void StartupCfgGen::EmitDynamicLoad(const std::string &name, std::set &configedKeywords) { if ((configedKeywords.find("path") == configedKeywords.end())) { - ofs_ << PATH_INFO << "\"" << hostInfoMap_[name].hostId << "\", \"" << name << "\", \"" << - hostInfoMap_[name].processPriority << "\", \"" << hostInfoMap_[name].threadPriority; + ofs_ << PATH_INFO << "\"" << "-i " << hostInfoMap_[name].hostId << "\", \"" << "-n " << name << + "\", \"" << "-p " < Date: Sun, 11 May 2025 18:38:22 +0800 Subject: [PATCH 4/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index 2c7fae966..b2db79039 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -103,18 +103,6 @@ static void SetProcTitle(char **argv, const char *newTitle) static void HdfSetProcPriority(int32_t procPriority, int32_t schedPriority) { -// int32_t schedPriority = 0; -// int32_t procPriority = 0; -// -// if (!HdfStringToInt(argv[DEVHOST_PROCESS_PRI_POS], &procPriority)) { -// HDF_LOGE("procPriority parameter error: %{public}s", argv[DEVHOST_PROCESS_PRI_POS]); -// return; -// } -// if (!HdfStringToInt(argv[DEVHOST_THREAD_PRI_POS], &schedPriority)) { -// HDF_LOGE("schedPriority parameter error: %{public}s", argv[DEVHOST_THREAD_PRI_POS]); -// return; -// } - if (setpriority(PRIO_PROCESS, 0, procPriority) != 0) { HDF_LOGE("host setpriority failed: %{public}d", errno); } -- Gitee From 68bbb13c3c8532ec40ae777aaf7988a5a56557ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sun, 11 May 2025 18:39:39 +0800 Subject: [PATCH 5/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index b2db79039..bf6cbaab4 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -176,7 +176,7 @@ int main(int argc, char **argv) { HostConfig config = {0}; if (ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS) { - printf("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); + HDF_LOGI("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); return HDF_ERR_INVALID_PARAM; } -- Gitee From 93dc1f388192c7be97641602d57b3d1c27ddf14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sun, 11 May 2025 18:42:15 +0800 Subject: [PATCH 6/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index bf6cbaab4..2b227cf42 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -176,7 +176,7 @@ int main(int argc, char **argv) { HostConfig config = {0}; if (ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS) { - HDF_LOGI("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); + HDF_LOGE("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); return HDF_ERR_INVALID_PARAM; } -- Gitee From 1ed4472fc3f94d3599027df39d9de981c5732544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Mon, 12 May 2025 11:20:40 +0800 Subject: [PATCH 7/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 55 +++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index 2b227cf42..6344fea6b 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -172,38 +172,33 @@ static int ParseCommandLineArgs(int argc, char **argv, HostConfig *config) return HDF_SUCCESS; } -int main(int argc, char **argv) +static int InitializeHost(const HostConfig *config, char **argv) { - HostConfig config = {0}; - if (ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS) { - HDF_LOGE("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); - return HDF_ERR_INVALID_PARAM; - } - prctl(PR_SET_PDEATHSIG, SIGKILL); // host process should exit with devmgr process - int hostId = config.hostId; - - const char *hostName = config.hostName; - HDF_LOGI("hdf device host %{public}s %{public}d start", hostName, hostId); - SetProcTitle(argv, hostName); - StartMemoryHook(hostName); - if ((config.processPriority != 0) && (config.schedPriority != 0)) { - HdfSetProcPriority(config.processPriority, config.schedPriority); + HDF_LOGI("hdf device host %{public}s %{public}d start", config->hostName, config->hostId); + SetProcTitle(argv, config->hostName); + StartMemoryHook(config->hostName); + if ((config->processPriority != 0) && (config->schedPriority != 0)) { + HdfSetProcPriority(config->processPriority, config->schedPriority); } - if ((config.malloptKey != 0) && (config.malloptValue != 0)) { - SetMallopt(config.malloptKey, config.malloptValue); + if ((config->malloptKey != 0) && (config->malloptValue != 0)) { + SetMallopt(config->malloptKey, config->malloptValue); } + return HDF_SUCCESS; +} - struct IDevHostService *instance = DevHostServiceNewInstance(hostId, hostName); +static int StartHostService(const HostConfig *config) +{ + struct IDevHostService *instance = DevHostServiceNewInstance(config->hostId, config->hostName); if (instance == NULL || instance->StartService == NULL) { HDF_LOGE("DevHostServiceGetInstance fail"); return HDF_ERR_INVALID_OBJECT; } - HDF_LOGD("create IDevHostService of %{public}s success", hostName); + HDF_LOGD("create IDevHostService of %{public}s success", config->hostName); DevHostDumpInit(); - HDF_LOGD("%{public}s start device service begin", hostName); + HDF_LOGD("%{public}s start device service begin", config->hostName); int status = instance->StartService(instance); if (status != HDF_SUCCESS) { HDF_LOGE("Devhost StartService fail, return: %{public}d", status); @@ -216,13 +211,29 @@ int main(int argc, char **argv) struct DevHostServiceFull *fullService = (struct DevHostServiceFull *)instance; struct HdfMessageLooper *looper = &fullService->looper; if ((looper != NULL) && (looper->Start != NULL)) { - HDF_LOGI("%{public}s start loop", hostName); + HDF_LOGI("%{public}s start loop", config->hostName); looper->Start(looper); } DevHostServiceFreeInstance(instance); HdfPowerManagerExit(); DevHostDumpDeInit(); - HDF_LOGI("hdf device host %{public}s %{public}d exit", hostName, hostId); + return HDF_SUCCESS; +} + +int main(int argc, char **argv) +{ + HostConfig config = {0}; + if (ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS) { + HDF_LOGE("ParseCommandLineArgs(argc, argv, &config) != HDF_SUCCESS"); + return HDF_ERR_INVALID_PARAM; + } + + if (InitializeHost(&config, argv) != HDF_SUCCESS) { + return HDF_ERR_INVALID_PARAM; + } + + int status = StartHostService(&config); + HDF_LOGI("hdf device host %{public}s %{public}d exit", config.hostName, config.hostId); return status; } -- Gitee From a2a0c1af3d2d358e47009645fbe598b69ab20563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Mon, 12 May 2025 17:01:46 +0800 Subject: [PATCH 8/9] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- adapter/uhdf2/host/devhost.c | 22 +++++++++---------- .../tools/hc-gen/src/startup_cfg_gen.cpp | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/adapter/uhdf2/host/devhost.c b/adapter/uhdf2/host/devhost.c index 6344fea6b..bea010327 100644 --- a/adapter/uhdf2/host/devhost.c +++ b/adapter/uhdf2/host/devhost.c @@ -88,17 +88,17 @@ bool HdfStringToInt(const char *str, int *value) static void SetProcTitle(char **argv, const char *newTitle) { - size_t len = strlen(argv[0]); - if (strlen(newTitle) > len) { - HDF_LOGE("failed to set new process title because the '%{public}s' is too long", newTitle); - return; + size_t len = strlen(argv[0]); // 获取原始进程标题的长度 + if (strlen(newTitle) > len) { // 如果新标题的长度超过原始标题的长度 + HDF_LOGE("failed to set new process title because the '%{public}s' is too long", newTitle); // 打印错误日志 + return; // 退出函数 } - (void)memset_s(argv[0], len, 0, len); - if (strcpy_s(argv[0], len + 1, newTitle) != EOK) { - HDF_LOGE("failed to set new process title"); - return; + (void)memset_s(argv[0], len, 0, len); // 将原始标题的内存清零 + if (strcpy_s(argv[0], len + 1, newTitle) != EOK) { // 将新标题复制到原始标题的位置 + HDF_LOGE("failed to set new process title"); // 如果复制失败,打印错误日志 + return; // 退出函数 } - prctl(PR_SET_NAME, newTitle); + prctl(PR_SET_NAME, newTitle); // 使用 prctl 系统调用设置进程的名字 } static void HdfSetProcPriority(int32_t procPriority, int32_t schedPriority) @@ -141,13 +141,13 @@ static int ParseCommandLineArgs(int argc, char **argv, HostConfig *config) config->hostName = optarg; break; case 'p': - if (!HdfStringToInt(optarg, &config->schedPriority)) { + if (!HdfStringToInt(optarg, &config->processPriority)) { HDF_LOGE("Invalid process priority: %{public}s", optarg); return HDF_ERR_INVALID_PARAM; } break; case 's': - if (!HdfStringToInt(optarg, &config->processPriority)) { + if (!HdfStringToInt(optarg, &config->schedPriority)) { HDF_LOGE("Invalid process priority: %{public}s", optarg); return HDF_ERR_INVALID_PARAM; } diff --git a/framework/tools/hc-gen/src/startup_cfg_gen.cpp b/framework/tools/hc-gen/src/startup_cfg_gen.cpp index d88b9311d..8c703cc57 100644 --- a/framework/tools/hc-gen/src/startup_cfg_gen.cpp +++ b/framework/tools/hc-gen/src/startup_cfg_gen.cpp @@ -109,8 +109,8 @@ void StartupCfgGen::EmitDynamicLoad(const std::string &name, std::set &configedKeywords) { if ((configedKeywords.find("path") == configedKeywords.end())) { - ofs_ << PATH_INFO << "\"" << "-i " << hostInfoMap_[name].hostId << "\", \"" << "-n " << name << - "\", \"" << "-p " < Date: Tue, 20 May 2025 08:53:09 +0000 Subject: [PATCH 9/9] update framework/tools/hc-gen/src/startup_cfg_gen.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁琦 --- framework/tools/hc-gen/src/startup_cfg_gen.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/tools/hc-gen/src/startup_cfg_gen.cpp b/framework/tools/hc-gen/src/startup_cfg_gen.cpp index 8c703cc57..bcb5d2f18 100644 --- a/framework/tools/hc-gen/src/startup_cfg_gen.cpp +++ b/framework/tools/hc-gen/src/startup_cfg_gen.cpp @@ -109,9 +109,13 @@ void StartupCfgGen::EmitDynamicLoad(const std::string &name, std::set &configedKeywords) { if ((configedKeywords.find("path") == configedKeywords.end())) { - ofs_ << PATH_INFO << "\"" << "-i\", \"" << hostInfoMap_[name].hostId << "\", \"" << "-n\", \"" << name << - "\", \"" << "-p\", \"" <