Browse Source

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.
gn-latest-20200428
Ludovic Courtès 7 years ago
parent
commit
60a56db007
  1. 4
      gnu/services/base.scm
  2. 2
      guix/build/syscalls.scm

4
gnu/services/base.scm

@ -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)))))

2
guix/build/syscalls.scm

@ -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)))))))

Loading…
Cancel
Save