aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorBernd Schubert <bernd@bsbernd.com>2024-12-28 14:41:15 +0100
committerBernd Schubert <bernd@bsbernd.com>2024-12-30 23:04:11 +0100
commit3d90402f9084edb90ddb00d6ccd8c2183e6df140 (patch)
tree6f0200f479b972d7c4ce4a4eb498a9f696d1c1de /lib/fuse_lowlevel.c
parent20b2edf61db70cff874e41c1ba750a560737331b (diff)
downloadlibfuse-3d90402f9084edb90ddb00d6ccd8c2183e6df140.tar.gz
fuse_lowlevel.c: define FUSE_MAXOP as CUSE_INIT
We don't want FUSE_MAXOP calculated at compilation time, as the ABI limit is CUSE_INIT - better use that value directly. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index e48efa5..a0d8647 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2712,7 +2712,12 @@ static struct {
[CUSE_INIT] = { cuse_lowlevel_init, "CUSE_INIT" },
};
-#define FUSE_MAXOP (sizeof(fuse_ll_ops) / sizeof(fuse_ll_ops[0]))
+/*
+ * For ABI compatibility we cannot allow higher values than CUSE_INIT.
+ * Without ABI compatibility we could use the size of the array.
+ * #define FUSE_MAXOP (sizeof(fuse_ll_ops) / sizeof(fuse_ll_ops[0]))
+ */
+#define FUSE_MAXOP (CUSE_INIT + 1)
static const char *opname(enum fuse_opcode opcode)
{