[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: services: dnsmasq: Use 'negative-cache?' instead of 'no-negcache?
From: |
??? |
Subject: |
01/02: services: dnsmasq: Use 'negative-cache?' instead of 'no-negcache?'. |
Date: |
Fri, 8 Jun 2018 11:33:48 -0400 (EDT) |
iyzsong pushed a commit to branch master
in repository guix.
commit c061eb587cbb8590a5cd4793b56a01560af747a8
Author: 宋文武 <address@hidden>
Date: Fri Jun 8 23:12:37 2018 +0800
services: dnsmasq: Use 'negative-cache?' instead of 'no-negcache?'.
The 'no-negcache?' option is mapped to the '--no-negcache' command-line
argument directly, but we're in the scheme world, where the general
guideline
is to avoid double-negations in identifiers.
* gnu/services/dns.scm <dnsmasq-configuration>: Replace the 'no-negcache?'
field with 'negative-cache?'.
* doc/guix.texi (DNS Services)[Dnsmasq Service]: Adjust accordingly.
---
doc/guix.texi | 4 ++--
gnu/services/dns.scm | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1183565..965ac42 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16858,8 +16858,8 @@ Specify IP address of upstream servers directly.
Set the size of dnsmasq's cache. Setting the cache size to zero
disables caching.
address@hidden @code{no-negcache?} (default: @code{#f})
-When true, disable negative caching.
address@hidden @code{negative-cache?} (default: @code{#t})
+When false, disable negative caching.
@end table
@end deftp
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index d0913e9..1b39d0f 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -622,8 +622,8 @@
(default '())) ;list of string
(cache-size dnsmasq-configuration-cache-size
(default 150)) ;integer
- (no-negcache? dnsmasq-configuration-no-negcache?
- (default #f))) ;boolean
+ (negative-cache? dnsmasq-configuration-negative-cache?
+ (default #t))) ;boolean
(define dnsmasq-shepherd-service
(match-lambda
@@ -631,7 +631,7 @@
no-hosts?
port local-service? listen-addresses
resolv-file no-resolv? servers
- cache-size no-negcache?)
+ cache-size negative-cache?)
(shepherd-service
(provision '(dnsmasq))
(requirement '(networking))
@@ -656,9 +656,9 @@
#$@(map (cut format #f "--server=~a" <>)
servers)
#$(format #f "--cache-size=~a" cache-size)
- #$@(if no-negcache?
- '("--no-negcache")
- '()))
+ #$@(if negative-cache?
+ '()
+ '("--no-negcache")))
#:pid-file "/run/dnsmasq.pid"))
(stop #~(make-kill-destructor))))))