]> err.no Git - systemd/commitdiff
util: declare __progname in util.h
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 21:36:48 +0000 (23:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 21:36:48 +0000 (23:36 +0200)
log.c
util.h

diff --git a/log.c b/log.c
index da1c4f61e3575505d4e0b2e6de7582239d7e8312..879cb537336e8461fec1c02ea79bceb79b41eeab 100644 (file)
--- a/log.c
+++ b/log.c
@@ -31,8 +31,6 @@
 #include "util.h"
 #include "macro.h"
 
-extern char * __progname;
-
 #define SYSLOG_TIMEOUT_USEC (5*USEC_PER_SEC)
 #define LOG_BUFFER_MAX 1024
 
@@ -188,7 +186,7 @@ static int write_to_syslog(
         zero(iovec);
         IOVEC_SET_STRING(iovec[0], header_priority);
         IOVEC_SET_STRING(iovec[1], header_time);
-        IOVEC_SET_STRING(iovec[2], file_name_from_path(__progname));
+        IOVEC_SET_STRING(iovec[2], __progname);
         IOVEC_SET_STRING(iovec[3], header_pid);
         IOVEC_SET_STRING(iovec[4], buffer);
 
@@ -228,7 +226,7 @@ static int write_to_kmsg(
 
         zero(iovec);
         IOVEC_SET_STRING(iovec[0], header_priority);
-        IOVEC_SET_STRING(iovec[1], file_name_from_path(__progname));
+        IOVEC_SET_STRING(iovec[1], __progname);
         IOVEC_SET_STRING(iovec[2], header_pid);
         IOVEC_SET_STRING(iovec[3], buffer);
         IOVEC_SET_STRING(iovec[4], (char*) "\n");
diff --git a/util.h b/util.h
index a1e79d47b1d491060e7a420b6e4dd62e63cc9815..273ece89f1be7729a2963d12080805e682757018 100644 (file)
--- a/util.h
+++ b/util.h
@@ -177,6 +177,8 @@ int fd_cloexec(int fd, bool cloexec);
 
 int close_all_fds(const int except[], unsigned n_except);
 
+extern char * __progname;
+
 const char *ioprio_class_to_string(int i);
 int ioprio_class_from_string(const char *s);