gnu: system: Make old-style swap use default flags.

* gnu/services/base.scm (swap-service-type): Use default flags (0) if
SWAP is not a new-style <swap-space> record.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
Josselin Poiret 2021-11-23 17:56:46 +00:00 committed by Tobias Geerinckx-Rice
parent 8452c5d1f4
commit d48b404cf5
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -2225,8 +2225,10 @@ (define device-lookup
(and device
(begin
(restart-on-EINTR (swapon device
#$(swap-space->flags-bit-mask
swap)))
#$(if (swap-space? swap)
(swap-space->flags-bit-mask
swap)
0)))
#t)))))
(stop #~(lambda _
(let ((device #$device-lookup))