core: modernize the SwitchRoot() bus method a bit
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Dec 2016 18:41:27 +0000 (19:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Dec 2016 19:00:09 +0000 (20:00 +0100)
commit710028b473c39446954b72c0d9dadb76cc7f81f8
treebfb8e0d16c2a7f4c3bace6a1772f10c6dfffbd0c
parentffeb828596ebc9e5b20333c72862569b8b0875ad
core: modernize the SwitchRoot() bus method a bit

Let's more verbose error messages when validating the input parameters fails.
Also, call path_is_os_tree() properly, as it doesn't return a boolean, but
possibly also an error. Finally, check for the existance of the new init
process with chase_symlinks() to properly handle possible symlinks on the init
binary (which might actually be pretty likely).
src/core/dbus-manager.c