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:
+1
-1
@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (streq(argv[1], "load") && restore_state()) {
|
||||
if (streq(argv[1], "load") && shall_restore_state()) {
|
||||
_cleanup_free_ char *value = NULL;
|
||||
|
||||
r = read_one_line_file(saved, &value);
|
||||
|
||||
Reference in New Issue
Block a user