]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
fixup! ratelimiting: moving mmapping to daemon/mmapped docs-develop-rrl-8r8r8r/deployments/4859
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 13 Aug 2024 10:33:01 +0000 (12:33 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 13 Aug 2024 10:33:01 +0000 (12:33 +0200)
EUCLEAN is Linux-specific apparently, so let's avoid it.

daemon/mmapped.c
daemon/mmapped.h

index 67309c588f69452cebd10c86d101dba9873485fe..8649833f1ae8379e5f048ab244b99b434a7b56a7 100644 (file)
@@ -63,7 +63,7 @@ int mmapped_init(struct mmapped *mmapped, const char *mmap_file, size_t size, vo
 
 fail_header_mismatch:
        kr_log_crit(SYSTEM, "Another instance of kresd uses file %s with different configuration.", mmap_file);
-       errno = EUCLEAN;
+       errno = ENOTRECOVERABLE;
 
 fail_errno:
        ret = kr_error(errno);
index 41414cba9446d849e2dbc6e644bc2083e11967eb..912a46c1f9fb23648d78a475d1dff0123581adea 100644 (file)
@@ -14,7 +14,7 @@ struct mmapped {
  * header is copied at its beginning and MMAPPED_WAS_FIRST is returned;
  * you should finish initialization and call mmapped_init_continue to degrade flock to shared.
  * Otherwise, it waits for shared flock, calls mmap, verifies that header is byte-wise identical and returns zero.
- * On header mismatch, kr_error(EUCLEAN) is returned; on a system error, kr_error(errno) is returned. */
+ * On header mismatch, kr_error(ENOTRECOVERABLE) is returned; on a system error, kr_error(errno) is returned. */
 int mmapped_init(struct mmapped *mmapped, const char *mmap_file, size_t size, void *header, size_t header_size);
 
 /* Degrade flock to shared after getting MMAPPED_WAS_FIRST from mmapped_init.