mirror of
https://github.com/systemd/systemd
synced 2026-03-29 19:24:50 +02:00
Compare commits
2 Commits
105bb924a9
...
9d0ad242b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d0ad242b8 | ||
|
|
936a7cb66a |
@ -39,7 +39,6 @@ The following exceptions apply:
|
||||
* the following sources are licensed under the **MIT** license (in case of our
|
||||
scripts, to facilitate copying and reuse of those helpers to other projects):
|
||||
- hwdb.d/parse_hwdb.py
|
||||
- man/glib-event-glue.c
|
||||
- src/basic/linux/batman_adv.h
|
||||
- src/basic/sparse-endian.h
|
||||
- tools/catalog-report.py
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* SPDX-License-Identifier: CC0-1.0 */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
@ -392,15 +392,17 @@ int find_hibernate_location(HibernateLocation **ret_hibernate_location) {
|
||||
}
|
||||
|
||||
/* prefer resume device or highest priority swap with most remaining space */
|
||||
if (hibernate_location && swap->priority < hibernate_location->swap->priority) {
|
||||
log_debug("%s: ignoring device with lower priority", swap->device);
|
||||
continue;
|
||||
}
|
||||
if (hibernate_location &&
|
||||
(swap->priority == hibernate_location->swap->priority
|
||||
&& swap->size - swap->used < hibernate_location->swap->size - hibernate_location->swap->used)) {
|
||||
log_debug("%s: ignoring device with lower usable space", swap->device);
|
||||
continue;
|
||||
if (sys_resume == 0) {
|
||||
if (hibernate_location && swap->priority < hibernate_location->swap->priority) {
|
||||
log_debug("%s: ignoring device with lower priority", swap->device);
|
||||
continue;
|
||||
}
|
||||
if (hibernate_location &&
|
||||
(swap->priority == hibernate_location->swap->priority
|
||||
&& swap->size - swap->used < hibernate_location->swap->size - hibernate_location->swap->used)) {
|
||||
log_debug("%s: ignoring device with lower usable space", swap->device);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
dev_t swap_device;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user