services: swap: Use 'restart-on-EINTR'.
* gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'. * guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
This commit is contained in:
parent
ea98270443
commit
60a56db007
@ -851,10 +851,10 @@ gexp, to open it, and evaluate @var{close} to close it."
|
|||||||
(requirement `(udev ,@requirement))
|
(requirement `(udev ,@requirement))
|
||||||
(documentation "Enable the given swap device.")
|
(documentation "Enable the given swap device.")
|
||||||
(start #~(lambda ()
|
(start #~(lambda ()
|
||||||
(swapon #$device)
|
(restart-on-EINTR (swapon #$device))
|
||||||
#t))
|
#t))
|
||||||
(stop #~(lambda _
|
(stop #~(lambda _
|
||||||
(swapoff #$device)
|
(restart-on-EINTR (swapoff #$device))
|
||||||
#f))
|
#f))
|
||||||
(respawn? #f)))))
|
(respawn? #f)))))
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ constants from <sys/mount.h>."
|
|||||||
(let ((ret (proc (string->pointer device)))
|
(let ((ret (proc (string->pointer device)))
|
||||||
(err (errno)))
|
(err (errno)))
|
||||||
(unless (zero? ret)
|
(unless (zero? ret)
|
||||||
(throw 'system-error "swapff" "~S: ~A"
|
(throw 'system-error "swapoff" "~S: ~A"
|
||||||
(list device (strerror err))
|
(list device (strerror err))
|
||||||
(list err)))))))
|
(list err)))))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user