diff options
| author | Josselin Poiret <dev@jpoiret.xyz> | 2021-11-15 20:26:29 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-11-23 10:24:27 +0100 |
| commit | 0831dfab75b4db9c8bcbc9b2d1e52d8db54d0ad9 (patch) | |
| tree | aef9cfe9d813c6ddbada36230eb07fa8fe9c4bea /gnu/system | |
| parent | f574dbd163f8b2d417c6d7ee08559626ae52b7c5 (diff) | |
system: Add swap flags.
* gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add
them.
* guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK,
SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them.
* gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it.
* gnu/services/base.scm (swap-service-type): Use it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/file-systems.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 027df7e9660..e1d1fb72cca 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm | |||
| @@ -102,7 +102,9 @@ | |||
| 102 | swap-space | 102 | swap-space |
| 103 | swap-space? | 103 | swap-space? |
| 104 | swap-space-target | 104 | swap-space-target |
| 105 | swap-space-dependencies)) | 105 | swap-space-dependencies |
| 106 | swap-space-priority | ||
| 107 | swap-space-discard?)) | ||
| 106 | 108 | ||
| 107 | ;;; Commentary: | 109 | ;;; Commentary: |
| 108 | ;;; | 110 | ;;; |
| @@ -726,6 +728,10 @@ subvolume name is unknown.")) | |||
| 726 | this-swap-space | 728 | this-swap-space |
| 727 | (target swap-space-target) | 729 | (target swap-space-target) |
| 728 | (dependencies swap-space-dependencies | 730 | (dependencies swap-space-dependencies |
| 729 | (default '()))) | 731 | (default '())) |
| 732 | (priority swap-space-priority | ||
| 733 | (default #f)) | ||
| 734 | (discard? swap-space-discard? | ||
| 735 | (default #f))) | ||
| 730 | 736 | ||
| 731 | ;;; file-systems.scm ends here | 737 | ;;; file-systems.scm ends here |
