chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update-utmp: Don't error out on runlevel updates if utmp doesn't exist
[elogind.git]
/
src
/
update-utmp
/
update-utmp.c
diff --git
a/src/update-utmp/update-utmp.c
b/src/update-utmp/update-utmp.c
index fceeed8b446873281b87080a7a70a9a3ec89c95c..67c5788fe7663032a0077b90bb9c09e6c696a381 100644
(file)
--- a/
src/update-utmp/update-utmp.c
+++ b/
src/update-utmp/update-utmp.c
@@
-301,8
+301,10
@@
static int on_runlevel(Context *c) {
#endif
if ((q = utmp_put_runlevel(runlevel, previous)) < 0) {
#endif
if ((q = utmp_put_runlevel(runlevel, previous)) < 0) {
- log_error("Failed to write utmp record: %s", strerror(-q));
- r = q;
+ if (q != -ESRCH && q != -ENOENT) {
+ log_error("Failed to write utmp record: %s", strerror(-q));
+ r = q;
+ }
}
return r;
}
return r;