util: unify reading of /proc/cmdline

Instead of individually checking for containers in each user do this
once in a new call proc_cmdline() that read the file only if we are not
in a container.
This commit is contained in:
Lennart Poettering
2013-11-06 03:15:16 +01:00
parent 1f0cd86b3d
commit 74df0fca09
15 changed files with 94 additions and 103 deletions
+1 -1
View File
@@ -291,7 +291,7 @@ int main(int argc, char *argv[]) {
* device probing should be complete), so that the validity
* check at boot time doesn't have to be reliable. */
if (streq(argv[1], "load") && restore_state()) {
if (streq(argv[1], "load") && shall_restore_state()) {
_cleanup_free_ char *value = NULL;
if (!validate_device(udev, device))