[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29483] [PATCH] services: Add openntpd service.
From: |
Ludovic Courtès |
Subject: |
[bug#29483] [PATCH] services: Add openntpd service. |
Date: |
Fri, 02 Mar 2018 17:46:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Efraim Flashner <address@hidden> skribis:
> On Mon, Feb 05, 2018 at 04:26:52PM +0100, Ludovic Courtès wrote:
>> Heya Efraim,
>>
>> > +(define openntpd-shepherd-service
>> > + (match-lambda
>> > + (($ <openntpd-configuration> openntpd openntpd-listen-on
>> > + openntpd-query-from openntpd-sensor openntpd-server
>> > + openntpd-servers openntpd-constraint-from
>> > + openntpd-constraints-from allow-large-adjustment?)
>>
>> This is error prone (you could be matching the wrong fields), could you
>> change that to ‘match-record’?
>>
>
> I think this is the only thing left over.
To be clear, the switch from ‘match-lambda’ to ‘match-record’ should be
entirely mechanical. The above snippet would become:
(define (openntpd-shepherd-service config)
(match-record config <openntpd-configuration>
(openntpd openntpd-listen-on
openntpd-query-from openntpd-sensor openntpd-server
openntpd-servers openntpd-constraint-from
openntpd-constraints-from allow-large-adjustment?)
…))
That’s all I was suggesting. The body of that procedure can remain
unchanged.
Does that make sense?
Thanks,
Ludo’.