logind: save object data only when started fully

This commit is contained in:
Lennart Poettering
2011-06-27 23:06:34 +02:00
parent 4d6d6518c3
commit accaeded15
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -86,6 +86,9 @@ int seat_save(Seat *s) {
assert(s);
if (!s->started)
return 0;
r = safe_mkdir("/run/systemd/seats", 0755, 0, 0);
if (r < 0)
goto finish;
+3
View File
@@ -111,6 +111,9 @@ int session_save(Session *s) {
assert(s);
if (!s->started)
return 0;
r = safe_mkdir("/run/systemd/sessions", 0755, 0, 0);
if (r < 0)
goto finish;
+3
View File
@@ -94,6 +94,9 @@ int user_save(User *u) {
assert(u);
assert(u->state_file);
if (!u->started)
return 0;
r = safe_mkdir("/run/systemd/users", 0755, 0, 0);
if (r < 0)
goto finish;