]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: Fix the -f pidfile (non-)creation logic.
authorPetr Rockai <prockai@redhat.com>
Wed, 10 Oct 2012 10:32:24 +0000 (12:32 +0200)
committerPetr Rockai <prockai@redhat.com>
Wed, 10 Oct 2012 11:53:21 +0000 (13:53 +0200)
daemons/lvmetad/lvmetad-core.c

index ff861a206f1ff66391fdbd5f24a924864b6565e4..22625c5c62f934990ec6acb6d66afc6d063bd05d 100644 (file)
@@ -1105,11 +1105,13 @@ int main(int argc, char *argv[])
                }
        }
 
-       if (s.foreground && !_socket_override) {
-               fprintf(stderr, "A socket path (-s) is required in foreground mode.");
-               exit(2);
-       } else {
-               s.pidfile = NULL;
+       if (s.foreground) {
+               if (!_socket_override) {
+                       fprintf(stderr, "A socket path (-s) is required in foreground mode.");
+                       exit(2);
+               } else {
+                       s.pidfile = NULL;
+               }
        }
 
        daemon_start(s);
This page took 0.040034 seconds and 5 git commands to generate.