summaryrefslogtreecommitdiff
path: root/src/shared/utmp-wtmp.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-05-07 21:36:12 +0200
committerKay Sievers <kay@vrfy.org>2012-05-08 02:33:10 +0200
commit9eb977db5b89b44f254ab40c1876a76b7d7ea2d0 (patch)
treed73a79d15c67aea358006832a1187ce66486b940 /src/shared/utmp-wtmp.c
parentbbc98d32560cc456531bf254f7b69054921082bd (diff)
util: split-out path-util.[ch]
Diffstat (limited to 'src/shared/utmp-wtmp.c')
-rw-r--r--src/shared/utmp-wtmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
index 6bba325d3e..046fb584fb 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
@@ -29,6 +29,7 @@
#include <sys/poll.h>
#include "macro.h"
+#include "path-util.h"
#include "utmp-wtmp.h"
int utmp_get_runlevel(int *runlevel, int *previous) {
@@ -224,7 +225,7 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line
strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id));
if (line)
- strncpy(store.ut_line, file_name_from_path(line), sizeof(store.ut_line));
+ strncpy(store.ut_line, path_get_file_name(line), sizeof(store.ut_line));
return write_entry_both(&store);
}