summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-device.c24
-rw-r--r--src/login/logind-device.h1
-rw-r--r--src/login/logind.c12
-rw-r--r--src/login/logind.h7
4 files changed, 18 insertions, 26 deletions
diff --git a/src/login/logind-device.c b/src/login/logind-device.c
index c5fe92bd60..76c5a5c88f 100644
--- a/src/login/logind-device.c
+++ b/src/login/logind-device.c
@@ -54,18 +54,7 @@ Device* device_new(Manager *m, const char *sysfs, bool master) {
return d;
}
-void device_free(Device *d) {
- assert(d);
-
- device_detach(d);
-
- hashmap_remove(d->manager->devices, d->sysfs);
-
- free(d->sysfs);
- free(d);
-}
-
-void device_detach(Device *d) {
+static void device_detach(Device *d) {
Seat *s;
SessionDevice *sd;
@@ -87,6 +76,17 @@ void device_detach(Device *d) {
}
}
+void device_free(Device *d) {
+ assert(d);
+
+ device_detach(d);
+
+ hashmap_remove(d->manager->devices, d->sysfs);
+
+ free(d->sysfs);
+ free(d);
+}
+
void device_attach(Device *d, Seat *s) {
Device *i;
bool had_master;
diff --git a/src/login/logind-device.h b/src/login/logind-device.h
index fa6eda7e55..c273d2bfa0 100644
--- a/src/login/logind-device.h
+++ b/src/login/logind-device.h
@@ -45,4 +45,3 @@ struct Device {
Device* device_new(Manager *m, const char *sysfs, bool master);
void device_free(Device *d);
void device_attach(Device *d, Seat *s);
-void device_detach(Device *d);
diff --git a/src/login/logind.c b/src/login/logind.c
index e334bebdf8..c4227f16b2 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -177,7 +177,7 @@ void manager_free(Manager *m) {
free(m);
}
-int manager_enumerate_devices(Manager *m) {
+static int manager_enumerate_devices(Manager *m) {
struct udev_list_entry *item = NULL, *first = NULL;
struct udev_enumerate *e;
int r;
@@ -226,7 +226,7 @@ finish:
return r;
}
-int manager_enumerate_buttons(Manager *m) {
+static int manager_enumerate_buttons(Manager *m) {
struct udev_list_entry *item = NULL, *first = NULL;
struct udev_enumerate *e;
int r;
@@ -284,7 +284,7 @@ finish:
return r;
}
-int manager_enumerate_seats(Manager *m) {
+static int manager_enumerate_seats(Manager *m) {
_cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
@@ -357,7 +357,7 @@ static int manager_enumerate_linger_users(Manager *m) {
return r;
}
-int manager_enumerate_users(Manager *m) {
+static int manager_enumerate_users(Manager *m) {
_cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r, k;
@@ -401,7 +401,7 @@ int manager_enumerate_users(Manager *m) {
return r;
}
-int manager_enumerate_sessions(Manager *m) {
+static int manager_enumerate_sessions(Manager *m) {
_cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
@@ -449,7 +449,7 @@ int manager_enumerate_sessions(Manager *m) {
return r;
}
-int manager_enumerate_inhibitors(Manager *m) {
+static int manager_enumerate_inhibitors(Manager *m) {
_cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
diff --git a/src/login/logind.h b/src/login/logind.h
index 9a3b9a8320..5c04d0a828 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -135,13 +135,6 @@ int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **_inhibitor);
int manager_process_seat_device(Manager *m, struct udev_device *d);
int manager_process_button_device(Manager *m, struct udev_device *d);
-int manager_enumerate_devices(Manager *m);
-int manager_enumerate_buttons(Manager *m);
-int manager_enumerate_seats(Manager *m);
-int manager_enumerate_sessions(Manager *m);
-int manager_enumerate_users(Manager *m);
-int manager_enumerate_inhibitors(Manager *m);
-
int manager_startup(Manager *m);
int manager_run(Manager *m);
int manager_spawn_autovt(Manager *m, int vtnr);