master - lvmetad: Fix the -f pidfile (non-)creation logic.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=622fb968a22d5b2c6ba3dcd9155743adfe5dec8c Commit: 622fb968a22d5b2c6ba3dcd9155743adfe5dec8c Parent: 6e523f01d07d7d819c2f0d9b1595e628ddffea24 Author: Petr Rockai <[email protected]> AuthorDate: Wed Oct 10 12:32:24 2012 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Wed Oct 10 13:53:21 2012 +0200
lvmetad: Fix the -f pidfile (non-)creation logic.
--- daemons/lvmetad/lvmetad-core.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
daemons/lvmetad/lvmetad-core.c +7 -5
@@ -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);