me
/
guix
Archived
1
0
Fork 0

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'.
Ludovic Courtès 2022-05-02 23:24:46 +02:00
parent 654f878f0b
commit 7855a9366b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 1 deletions

View File

@ -131,7 +131,10 @@ use this facility."))))
;; configure and start this service. Only one value can be provided. We
;; override it with the value returned by the extending service.
(compose identity)
(extend (lambda (config values) (first values)))
(extend (lambda (config values)
(match values
((first . rest) first)
(_ config))))
(default-value (pipefs-configuration))
(description "Mount the pipefs file system, which is used to transfer
NFS-related data between the kernel and user-space programs."))))