-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
currently it's more of a rearrangment of the original code, with some added safety/integrity checks `resume` is now a separate function, the plan is to have the code for actually resuming within this function and code for locating the device outside. in the more general case, if `late_resume` is enabled, the initram will check at both the `init_early` and again at the `init_premount` stage for the presence of the resume device. Once host-only is implemented then it'll be able to determine at build time which state it'll need to check at. For safety checks, currently it checks whether the device is a valid block device, whether resume has already been attempted previous (based on the content of `/sys/power/resume`) & whether there are are any other mounted block devices.
- Loading branch information
Showing
2 changed files
with
48 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
cmdline_strings = [ "resume" ] | ||
|
||
binaries = [ 'lsblk' ] | ||
|
||
[imports.init_early] | ||
"ugrd.fs.resume" = [ "handle_resume" ] | ||
"ugrd.fs.resume" = [ "handle_early_resume" ] | ||
|
||
[imports.init_premount] | ||
"ugrd.fs.resume" = [ "handle_late_resume"] | ||
|
||
[imports.functions] | ||
"ugrd.fs.resume" = ["resume"] | ||
|
||
[custom_parameters] | ||
late_resume = "bool" |