aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/services/base.scm4
-rw-r--r--guix/build/syscalls.scm2
2 files changed, 3 insertions, 3 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 697b9395c2..d5744204d9 100644
--- a/gnu/services/base.scm
+++ b/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)))))
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 9ec7e8b4a9..3585bf27a8 100644
--- a/guix/build/syscalls.scm
+++ b/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)))))))