chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID
[elogind.git]
/
src
/
login
/
logind-seat.c
diff --git
a/src/login/logind-seat.c
b/src/login/logind-seat.c
index 33fd3afacae4ff38af25d10fc71fa4205dc4cbdc..92fa3c9c64f8eb4f749cfda1f60501dcfdfdd328 100644
(file)
--- a/
src/login/logind-seat.c
+++ b/
src/login/logind-seat.c
@@
-27,7
+27,7
@@
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
-#include "format
s
-util.h"
+#include "format-util.h"
#include "logind-acl.h"
#include "logind-seat.h"
#include "mkdir.h"
#include "logind-acl.h"
#include "logind-seat.h"
#include "mkdir.h"
@@
-48,18
+48,15
@@
Seat *seat_new(Manager *m, const char *id) {
return NULL;
s->state_file = strappend("/run/systemd/seats/", id);
return NULL;
s->state_file = strappend("/run/systemd/seats/", id);
- if (!s->state_file) {
- free(s);
- return NULL;
- }
+ if (!s->state_file)
+ return mfree(s);
s->id = basename(s->state_file);
s->manager = m;
if (hashmap_put(m->seats, s->id, s) < 0) {
free(s->state_file);
s->id = basename(s->state_file);
s->manager = m;
if (hashmap_put(m->seats, s->id, s) < 0) {
free(s->state_file);
- free(s);
- return NULL;
+ return mfree(s);
}
return s;
}
return s;
@@
-368,7
+365,6
@@
int seat_active_vt_changed(Seat *s, unsigned int vtnr) {
}
r = seat_set_active(s, new_active);
}
r = seat_set_active(s, new_active);
-
#if 0 /// elogind does not spawn autovt
manager_spawn_autovt(s->manager, vtnr);
#endif // 0
#if 0 /// elogind does not spawn autovt
manager_spawn_autovt(s->manager, vtnr);
#endif // 0
@@
-424,7
+420,7
@@
int seat_start(Seat *s) {
return 0;
log_struct(LOG_INFO,
return 0;
log_struct(LOG_INFO,
-
LOG_MESSAGE_ID(SD_MESSAGE_SEAT_START)
,
+
"MESSAGE_ID=" SD_MESSAGE_SEAT_START_STR
,
"SEAT_ID=%s", s->id,
LOG_MESSAGE("New seat %s.", s->id),
NULL);
"SEAT_ID=%s", s->id,
LOG_MESSAGE("New seat %s.", s->id),
NULL);
@@
-454,7
+450,7
@@
int seat_stop(Seat *s, bool force) {
if (s->started)
log_struct(LOG_INFO,
if (s->started)
log_struct(LOG_INFO,
-
LOG_MESSAGE_ID(SD_MESSAGE_SEAT_STOP)
,
+
"MESSAGE_ID=" SD_MESSAGE_SEAT_STOP_STR
,
"SEAT_ID=%s", s->id,
LOG_MESSAGE("Removed seat %s.", s->id),
NULL);
"SEAT_ID=%s", s->id,
LOG_MESSAGE("Removed seat %s.", s->id),
NULL);
@@
-551,8
+547,6
@@
int seat_attach_session(Seat *s, Session *session) {
LIST_PREPEND(sessions_by_seat, s->sessions, session);
seat_assign_position(s, session);
LIST_PREPEND(sessions_by_seat, s->sessions, session);
seat_assign_position(s, session);
- seat_send_changed(s, "Sessions", NULL);
-
/* On seats with VTs, the VT logic defines which session is active. On
* seats without VTs, we automatically activate new sessions. */
if (!seat_has_vts(s))
/* On seats with VTs, the VT logic defines which session is active. On
* seats without VTs, we automatically activate new sessions. */
if (!seat_has_vts(s))