diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-dbus.c | 1 | ||||
-rw-r--r-- | src/login/logind-inhibit.c | 4 | ||||
-rw-r--r-- | src/login/logind-seat.c | 3 | ||||
-rw-r--r-- | src/login/logind-session.c | 3 | ||||
-rw-r--r-- | src/login/sysfs-show.c | 1 |
5 files changed, 8 insertions, 4 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index a361b93dc7..9fc3a14317 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -28,6 +28,7 @@ #include "dbus-common.h" #include "strv.h" #include "mkdir.h" +#include "path-util.h" #include "polkit.h" #include "special.h" diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index e4eefd0def..b5b801e5e0 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -28,7 +28,7 @@ #include "util.h" #include "mkdir.h" - +#include "path-util.h" #include "logind-inhibit.h" Inhibitor* inhibitor_new(Manager *m, const char* id) { @@ -46,7 +46,7 @@ Inhibitor* inhibitor_new(Manager *m, const char* id) { return NULL; } - i->id = file_name_from_path(i->state_file); + i->id = path_get_file_name(i->state_file); if (hashmap_put(m->inhibitors, i->id, i) < 0) { free(i->state_file); diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 1bae6f6e07..06debf887a 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -31,6 +31,7 @@ #include "logind-acl.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; @@ -48,7 +49,7 @@ Seat *seat_new(Manager *m, const char *id) { return NULL; } - s->id = file_name_from_path(s->state_file); + s->id = path_get_file_name(s->state_file); s->manager = m; if (hashmap_put(m->seats, s->id, s) < 0) { diff --git a/src/login/logind-session.c b/src/login/logind-session.c index e297d3feeb..475ebcaa5e 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -28,6 +28,7 @@ #include "strv.h" #include "util.h" #include "mkdir.h" +#include "path-util.h" #include "cgroup-util.h" #include "logind-session.h" @@ -49,7 +50,7 @@ Session* session_new(Manager *m, User *u, const char *id) { return NULL; } - s->id = file_name_from_path(s->state_file); + s->id = path_get_file_name(s->state_file); if (hashmap_put(m->sessions, s->id, s) < 0) { free(s->state_file); diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index b0edc33b80..bc1bbccff7 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -25,6 +25,7 @@ #include "util.h" #include "sysfs-show.h" +#include "path-util.h" static int show_sysfs_one( struct udev *udev, |