From d978da1ea3c80a8ddb731e4e25662f48ec442d44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Aug 2024 12:33:01 +0200 Subject: [PATCH] fixup! ratelimiting: moving mmapping to daemon/mmapped EUCLEAN is Linux-specific apparently, so let's avoid it. --- daemon/mmapped.c | 2 +- daemon/mmapped.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/mmapped.c b/daemon/mmapped.c index 67309c588..8649833f1 100644 --- a/daemon/mmapped.c +++ b/daemon/mmapped.c @@ -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); diff --git a/daemon/mmapped.h b/daemon/mmapped.h index 41414cba9..912a46c1f 100644 --- a/daemon/mmapped.h +++ b/daemon/mmapped.h @@ -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. -- 2.47.2