File bug-1047376_sbd-not-use-watchdog-conflicting-options.patch of Package sbd
commit 68c73ec1678fdb8472edbb0b9a9667311bcf55e8
Author: Gao,Yan <ygao@suse.com>
Date: Tue Jul 4 20:02:48 2017 +0200
Fix: sbd-inquisitor: Do not use watchdog if the conflicting options "-W" and "-w /dev/null" are both supplied
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
index 4c47494..7b73808 100644
--- a/src/sbd-inquisitor.c
+++ b/src/sbd-inquisitor.c
@@ -1019,11 +1019,11 @@ int main(int argc, char **argv, char **envp)
}
}
- if (W_count > 0) {
- watchdog_use = arg_enabled(W_count);
-
- } else if(watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) {
+ if (watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) {
watchdog_use = 0;
+
+ } else if (W_count > 0) {
+ watchdog_use = arg_enabled(W_count);
}
if (watchdog_use) {