summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-05-02 23:24:46 +0200
committerLudovic Courtès <ludo@gnu.org>2022-05-03 18:02:27 +0200
commit7855a9366b2f5248d8fffab93c108abef8146f40 (patch)
tree82d1e26f2d28f82dd0cd777f79e915b53115968f /gnu/services
parent654f878f0b9d2136affa3e3d32da1639e6942a54 (diff)
services: pipefs: Correctly handle lack of extensions.
Previously, in the absence of extensions of 'pipefs-service-type', we'd get a wrong-type-arg exception while folding services: In gnu/services/nfs.scm: 134:37 1 (_ #<<pipefs-configuration> mount-point: "/var/lib/nfs…> …) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) In procedure car: Wrong type argument in position 1 (expecting pair): () * gnu/services/nfs.scm (pipefs-service-type)[extend]: Gracefully handle the case where VALUES is the empty list, as done in 'gss-service-type'.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/nfs.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
index 9b795c9e710..209cde24b35 100644
--- a/gnu/services/nfs.scm
+++ b/gnu/services/nfs.scm
@@ -131,7 +131,10 @@ use this facility."))))
131 ;; configure and start this service. Only one value can be provided. We 131 ;; configure and start this service. Only one value can be provided. We
132 ;; override it with the value returned by the extending service. 132 ;; override it with the value returned by the extending service.
133 (compose identity) 133 (compose identity)
134 (extend (lambda (config values) (first values))) 134 (extend (lambda (config values)
135 (match values
136 ((first . rest) first)
137 (_ config))))
135 (default-value (pipefs-configuration)) 138 (default-value (pipefs-configuration))
136 (description "Mount the pipefs file system, which is used to transfer 139 (description "Mount the pipefs file system, which is used to transfer
137NFS-related data between the kernel and user-space programs.")))) 140NFS-related data between the kernel and user-space programs."))))