aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2015-02-22 14:41:45 +0000
committerKarel Zak <kzak@redhat.com>2015-02-24 13:18:49 +0100
commit52a49e9add7b3618c65782b64c48226311dda01a (patch)
tree2c835d5b652dd3929824b1119f70eac9706248e9
parentcd2a6f1cfd1ca85aae127fcdb249df46163d1a7c (diff)
downloadutil-linux-playground-52a49e9add7b3618c65782b64c48226311dda01a.tar.gz
logger: move /dev/log to pathnames.h
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--include/pathnames.h3
-rw-r--r--misc-utils/logger.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/pathnames.h b/include/pathnames.h
index cbc93b7698..cc01589cda 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -193,5 +193,8 @@
/* kernel command line */
#define _PATH_PROC_CMDLINE "/proc/cmdline"
+/* logger paths */
+#define _PATH_DEVLOG "/dev/log"
+
#endif /* PATHNAMES_H */
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index a3af7f1135..db6fd448a3 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -56,6 +56,7 @@
#include "c.h"
#include "closestream.h"
#include "nls.h"
+#include "pathnames.h"
#include "strutils.h"
#include "xalloc.h"
@@ -481,7 +482,7 @@ static void logger_open(struct logger_ctl *ctl)
ctl->syslogfp = syslog_rfc5424;
return;
}
- ctl->fd = unix_socket(ctl, "/dev/log", ctl->socket_type);
+ ctl->fd = unix_socket(ctl, _PATH_DEVLOG, ctl->socket_type);
ctl->syslogfp = syslog_local;
}