util-lib: move shall_restore_state() to shared/reboot-util
It's just a small function, but it is higher-level functionality. I don't see a good place for it, reboot-util.[ch] seems least bad
This commit is contained in:
@@ -306,14 +306,3 @@ int proc_cmdline_get_key_many_internal(ProcCmdlineFlags flags, ...) {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int shall_restore_state(void) {
|
||||
bool ret;
|
||||
int r;
|
||||
|
||||
r = proc_cmdline_get_bool("systemd.restore_state", &ret);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return r > 0 ? ret : true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user