Merge pull request #32125 from YHNdnzj/post-merge-stuff

Trivial post merge stuff
This commit is contained in:
Luca Boccassi 2024-04-05 22:18:31 +01:00 committed by GitHub
commit 1281115957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 12 deletions

View file

@ -196,7 +196,7 @@
</varlistentry>
<varlistentry>
<term><varname>SleepMemMode=</varname></term>
<term><varname>MemorySleepMode=</varname></term>
<listitem><para>The string to be written to <filename>/sys/power/mem_sleep</filename>
when <option>SuspendState=mem</option> or <command>hybrid-sleep</command> is used.

View file

@ -72,16 +72,11 @@ int path_extract_image_name(const char *path, char **ret) {
r = path_extract_filename(path, &fn);
if (r < 0)
return r;
if (r != O_DIRECTORY) {
/* Chop off any image suffixes we recognize (unless we already know this must refer to some dir */
FOREACH_STRING(suffix, ".sysext.raw", ".confext.raw", ".raw") {
char *m = endswith(fn, suffix);
if (m) {
*m = 0;
break;
}
}
/* Chop off any image suffixes we recognize (unless we already know this must refer to some dir) */
char *m = ENDSWITH_SET(fn, ".sysext.raw", ".confext.raw", ".raw");
if (m)
*m = 0;
}
/* Truncate the version/counting suffixes */

View file

@ -142,7 +142,7 @@ int parse_sleep_config(SleepConfig **ret) {
{ "Sleep", "HybridSleepState", config_parse_warn_compat, DISABLED_LEGACY, NULL },
{ "Sleep", "HybridSleepMode", config_parse_warn_compat, DISABLED_LEGACY, NULL },
{ "Sleep", "SleepMemMode", config_parse_sleep_mode, 0, &sc->mem_modes },
{ "Sleep", "MemorySleepMode", config_parse_sleep_mode, 0, &sc->mem_modes },
{ "Sleep", "HibernateDelaySec", config_parse_sec, 0, &sc->hibernate_delay_usec },
{ "Sleep", "SuspendEstimationSec", config_parse_sec, 0, &sc->suspend_estimation_usec },

View file

@ -23,6 +23,6 @@
#AllowHybridSleep=yes
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#SleepMemMode=
#MemorySleepMode=
#HibernateDelaySec=
#SuspendEstimationSec=60min