sd-daemon: Simplify sd_booted() check
authorLennart Poettering <lennart@poettering.net>
Wed, 23 Sep 2015 15:23:18 +0000 (17:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 29 Sep 2015 19:55:51 +0000 (21:55 +0200)
commit31021ba0853d40ffdd8fdcd6611bddd4419a7357
treefa04f32ea22639e972603a31e43c2bac693cf34f
parent94f099d8132da7987a5dbe930dadf31aaded9a11
sd-daemon: Simplify sd_booted() check

We can just use access() to check whether /run/system/system/ is a
directory, no need to involve stat(). The trick is to suffix the path
name with a dash.
src/libsystemd/sd-daemon/sd-daemon.c