diff options
author | Bernd Schubert <bernd@bsbernd.com> | 2024-12-28 14:41:15 +0100 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2024-12-30 23:04:11 +0100 |
commit | 3d90402f9084edb90ddb00d6ccd8c2183e6df140 (patch) | |
tree | 6f0200f479b972d7c4ce4a4eb498a9f696d1c1de | |
parent | 20b2edf61db70cff874e41c1ba750a560737331b (diff) | |
download | libfuse-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>
-rw-r--r-- | lib/fuse_lowlevel.c | 7 |
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) { |