tools: hv: fix KVP and VSS daemons exit code
authorAdrian Vladu <avladu@cloudbasesolutions.com>
Mon, 6 May 2019 16:50:58 +0000 (16:50 +0000)
committerSasha Levin <sashal@kernel.org>
Sat, 17 Aug 2019 19:29:23 +0000 (15:29 -0400)
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/hv/hv_kvp_daemon.c
tools/hv/hv_vss_daemon.c

index d7e06fe0270eefb29343b82ce4971765c2a981d5..0ce50c319cfd644acf387c5588764d6c31cd207c 100644 (file)
@@ -1386,6 +1386,8 @@ int main(int argc, char *argv[])
                        daemonize = 0;
                        break;
                case 'h':
                        daemonize = 0;
                        break;
                case 'h':
+                       print_usage(argv);
+                       exit(0);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);
index efe1e34dd91b40c0a117432b38122087e22f76c8..8f813f5233d48ac117dd632424fdb3c9a3fc9782 100644 (file)
@@ -218,6 +218,8 @@ int main(int argc, char *argv[])
                        daemonize = 0;
                        break;
                case 'h':
                        daemonize = 0;
                        break;
                case 'h':
+                       print_usage(argv);
+                       exit(0);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);