hv: tools: fix KVP and VSS daemons exit code
diff mbox series

Message ID 20190506165058.6749-1-avladu@cloudbasesolutions.com
State Accepted
Commit b0995156071b0ff29a5902964a9dc8cfad6f81c0
Headers show
Series
  • hv: tools: fix KVP and VSS daemons exit code
Related show

Commit Message

Adrian Vladu May 6, 2019, 4:50 p.m. UTC
HyperV KVP and VSS daemons should exit with 0 when the '--help'
or '-h' flags are used.

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>

Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
---
 tools/hv/hv_kvp_daemon.c | 2 ++
 tools/hv/hv_vss_daemon.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Sasha Levin May 9, 2019, 1:08 a.m. UTC | #1
On Mon, May 06, 2019 at 04:50:58PM +0000, Adrian Vladu wrote:
>HyperV KVP and VSS daemons should exit with 0 when the '--help'
>or '-h' flags are used.
>
>Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
>
>Cc: "K. Y. Srinivasan" <kys@microsoft.com>
>Cc: Haiyang Zhang <haiyangz@microsoft.com>
>Cc: Stephen Hemminger <sthemmin@microsoft.com>
>Cc: Sasha Levin <sashal@kernel.org>
>Cc: Alessandro Pilotti <apilotti@cloudbasesolutions.com>

Queued for hyperv-fixes, thanks!

--
Thanks,
Sasha

Patch
diff mbox series

diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 8a240b31822b..f5597503c771 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1386,6 +1386,8 @@  int main(int argc, char *argv[])
 			daemonize = 0;
 			break;
 		case 'h':
+			print_usage(argv);
+			exit(0);
 		default:
 			print_usage(argv);
 			exit(EXIT_FAILURE);
diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c
index 3abd293c2a35..b58c4bbc0a26 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -229,6 +229,8 @@  int main(int argc, char *argv[])
 			daemonize = 0;
 			break;
 		case 'h':
+			print_usage(argv);
+			exit(0);
 		default:
 			print_usage(argv);
 			exit(EXIT_FAILURE);