47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
From 8cdc9f0c63f897240f1325faf287250c19e3b57a Mon Sep 17 00:00:00 2001
|
|
From: xietangxin <xietangxin@huawei.com>
|
|
Date: Mon, 8 May 2023 17:25:24 +0800
|
|
Subject: [PATCH] bugfix: fix gala-gopher -h print err
|
|
|
|
---
|
|
res/event_multy_language.rc | 2 +-
|
|
src/daemon/main.c | 6 +++---
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/res/event_multy_language.rc b/res/event_multy_language.rc
|
|
index 0fb255b..04d580e 100644
|
|
--- a/res/event_multy_language.rc
|
|
+++ b/res/event_multy_language.rc
|
|
@@ -228,7 +228,7 @@ events_en_US =
|
|
}
|
|
);
|
|
|
|
-events_chinese =
|
|
+events_zh_CN =
|
|
(
|
|
{
|
|
entity_name = "cpu",
|
|
diff --git a/src/daemon/main.c b/src/daemon/main.c
|
|
index bb39f08..5007486 100644
|
|
--- a/src/daemon/main.c
|
|
+++ b/src/daemon/main.c
|
|
@@ -87,12 +87,12 @@ static int CmdProcessing(int argc, char *argv[])
|
|
int option_index = 0;
|
|
cmd = getopt_long(argc, argv, short_options, long_options, &option_index);
|
|
if (cmd == -1)
|
|
- break;
|
|
+ return -1;
|
|
|
|
switch (cmd) {
|
|
case 'h':
|
|
- ShowUsage();
|
|
- break;
|
|
+ // print usage later
|
|
+ return -1;
|
|
case 'c':
|
|
ret = ParseConfigPath(optarg);
|
|
break;
|
|
--
|
|
2.33.0
|
|
|