3
4
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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:
Ludovic Courtès 2015-05-21 23:24:49 +02:00
parent ea98270443
commit 60a56db007
2 changed files with 3 additions and 3 deletions

View file

@ -851,10 +851,10 @@ gexp, to open it, and evaluate @var{close} to close it."
(requirement `(udev ,@requirement))
(documentation "Enable the given swap device.")
(start #~(lambda ()
(swapon #$device)
(restart-on-EINTR (swapon #$device))
#t))
(stop #~(lambda _
(swapoff #$device)
(restart-on-EINTR (swapoff #$device))
#f))
(respawn? #f)))))

View file

@ -218,7 +218,7 @@ constants from <sys/mount.h>."
(let ((ret (proc (string->pointer device)))
(err (errno)))
(unless (zero? ret)
(throw 'system-error "swapff" "~S: ~A"
(throw 'system-error "swapoff" "~S: ~A"
(list device (strerror err))
(list err)))))))