aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd.c
diff options
context:
space:
mode:
authorPeter Lemenkov <[email protected]>2014-11-02 18:06:21 +0300
committerLukas Larsson <[email protected]>2014-11-24 17:33:31 +0100
commit5db2345baa3bb9c835f91aafac3dde6e595debc7 (patch)
tree8563782637dfb0e606e4b06ec83aefe87dad9621 /erts/epmd/src/epmd.c
parent59740d8fee66f3326b30ac25882b52ffada4bac2 (diff)
downloadotp-5db2345baa3bb9c835f91aafac3dde6e595debc7.tar.gz
otp-5db2345baa3bb9c835f91aafac3dde6e595debc7.tar.bz2
otp-5db2345baa3bb9c835f91aafac3dde6e595debc7.zip
epmd: Unify systemd autoconf macros usage
Don't use both HAVE_SYSTEMD_DAEMON and HAVE_SYSTEMD_SD_DAEMON - use only the former one and remove the latter one entirely. Signed-off-by: Peter Lemenkov <[email protected]>
Diffstat (limited to 'erts/epmd/src/epmd.c')
-rw-r--r--erts/epmd/src/epmd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index dff9bc64de..9699491526 100644
--- a/erts/epmd/src/epmd.c
+++ b/erts/epmd/src/epmd.c
@@ -175,9 +175,9 @@ int main(int argc, char** argv)
g->nodes.reg = g->nodes.unreg = g->nodes.unreg_tail = NULL;
g->nodes.unreg_count = 0;
g->active_conn = 0;
-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+#ifdef HAVE_SYSTEMD_DAEMON
g->is_systemd = 0;
-#endif
+#endif /* HAVE_SYSTEMD_DAEMON */
for (i = 0; i < MAX_LISTEN_SOCKETS; i++)
g->listenfd[i] = -1;
@@ -251,11 +251,11 @@ int main(int argc, char** argv)
else
usage(g);
epmd_cleanup_exit(g,0);
-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+#ifdef HAVE_SYSTEMD_DAEMON
} else if (strcmp(argv[0], "-systemd") == 0) {
g->is_systemd = 1;
argv++; argc--;
-#endif
+#endif /* HAVE_SYSTEMD_DAEMON */
} else
usage(g);
}
@@ -461,11 +461,11 @@ static void usage(EpmdVars *g)
fprintf(stderr, " Forcibly unregisters a name with epmd\n");
fprintf(stderr, " (only allowed if -relaxed_command_check was given when \n");
fprintf(stderr, " epmd was started).\n");
-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+#ifdef HAVE_SYSTEMD_DAEMON
fprintf(stderr, " -systemd\n");
fprintf(stderr, " Wait for socket from systemd. The option makes sense\n");
fprintf(stderr, " when started from .socket unit.\n");
-#endif
+#endif /* HAVE_SYSTEMD_DAEMON */
epmd_cleanup_exit(g,1);
}
@@ -594,10 +594,10 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval)
free(g->argv[i]);
free(g->argv);
}
-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+#ifdef HAVE_SYSTEMD_DAEMON
sd_notifyf(0, "STATUS=Exited.\n"
"ERRNO=%i", exitval);
-#endif // HAVE_SYSTEMD_SD_DAEMON_H
+#endif /* HAVE_SYSTEMD_DAEMON */
exit(exitval);
}