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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:20:47 +0000 (10:20 +0200)
[ Upstream commit b0995156071b0ff29a5902964a9dc8cfad6f81c0 ]

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 62c9a503ae0522cca0324eea413fd0038542cf91..0ef215061fb50f2e9a1277f0d6c803c15aa8e618 100644 (file)
@@ -1380,6 +1380,8 @@ int main(int argc, char *argv[])
                        daemonize = 0;
                        break;
                case 'h':
+                       print_usage(argv);
+                       exit(0);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);
index 34031a297f0246116d7cff92e6226a8900e4c4a8..514d29966ac6738d42158690a4f973a1e5671d3e 100644 (file)
@@ -172,6 +172,8 @@ int main(int argc, char *argv[])
                        daemonize = 0;
                        break;
                case 'h':
+                       print_usage(argv);
+                       exit(0);
                default:
                        print_usage(argv);
                        exit(EXIT_FAILURE);