From d4317c040635a67c62df95bd102e03575d49f09d Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Fri, 15 May 2015 19:28:23 +0200 Subject: [PATCH] lvmpolld: don't return success on invalid option --- daemons/lvmpolld/lvmpolld-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemons/lvmpolld/lvmpolld-core.c b/daemons/lvmpolld/lvmpolld-core.c index a141d7776..1a33625a1 100644 --- a/daemons/lvmpolld/lvmpolld-core.c +++ b/daemons/lvmpolld/lvmpolld-core.c @@ -914,7 +914,7 @@ int main(int argc, char *argv[]) .socket_path = getenv("LVM_LVMPOLLD_SOCKET") ?: LVMPOLLD_SOCKET, }; - while ((opt = getopt_long(argc, argv, "?fhVl:p:s:B:t:", long_options, &option_index)) != -1) { + while ((opt = getopt_long(argc, argv, "fhVl:p:s:B:t:", long_options, &option_index)) != -1) { switch (opt) { case 0 : if (action < ACTION_MAX) { @@ -928,7 +928,7 @@ int main(int argc, char *argv[]) break; case '?': _usage(argv[0], stderr); - exit(EXIT_SUCCESS); + exit(EXIT_FAILURE); case 'B': /* --binary */ ls.lvm_binary = optarg; server = 1;