From 4efc7582a255439a574f577272d8be11f6491fe4 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 3 Feb 2025 23:03:03 -0700 Subject: lib9p: Separate the srv config from the main config --- lib9p/srv.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib9p/srv.c') diff --git a/lib9p/srv.c b/lib9p/srv.c index 10a8a96..06117b8 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -20,8 +20,16 @@ #define IMPLEMENTATION_FOR_LIB9P_SRV_H YES #include + #include "internal.h" +#ifndef CONFIG_9P_SRV_MAX_FIDS + #error config.h must define CONFIG_9P_SRV_MAX_FIDS +#endif +#ifndef CONFIG_9P_SRV_MAX_REQS + #error config.h must define CONFIG_9P_SRV_MAX_REQS +#endif + /* context ********************************************************************/ bool lib9p_srv_flush_requested(struct lib9p_srv_ctx *ctx) { @@ -55,13 +63,13 @@ struct _srv_fidinfo { #define NAME fidmap #define KEY_T lib9p_fid_t #define VAL_T struct _srv_fidinfo -#define CAP CONFIG_9P_MAX_FIDS +#define CAP CONFIG_9P_SRV_MAX_FIDS #include "map.h" #define NAME reqmap #define KEY_T lib9p_tag_t #define VAL_T struct _lib9p_srv_req * -#define CAP CONFIG_9P_MAX_REQS +#define CAP CONFIG_9P_SRV_MAX_REQS #include "map.h" /* The hierarchy of concepts is: -- cgit v1.2.3-2-g168b