From 58f85bfa9b7dca9a216cd0bb4e38e9cdf4b661da Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Mon, 13 May 2024 12:32:06 +0200 Subject: Add in the libfuse version a program was compiled with (#942) The API stays the same, the libfuse version comes from inlined functions, which are defined fuse_lowlevel.h and fuse.h. As these inlined functions are defined in the header files they get added into the application, similar as if these were preprocessor macros. Macro vs inlined function is then just a style issue - I personally prefer the latter. fuse_session_new() -> static inlinei, in the application _fuse_session_new -> inside of libfuse fuse_new() -> static inline, in the application _fuse_new() -> inside of libfuse Note: Entirely untested is the fuse 30 api - we need a test for it. And we do not have any ABI tests at all. Signed-off-by: Bernd Schubert --- include/fuse_common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/fuse_common.h') diff --git a/include/fuse_common.h b/include/fuse_common.h index 8803b68..a614fb0 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -836,6 +836,18 @@ struct fuse_bufvec { struct fuse_buf buf[1]; }; +/** + * libfuse version a file system was compiled with. Should be filled in from + * defines in 'libfuse_config.h' + */ +struct libfuse_version +{ + int major; + int minor; + int hotfix; + int padding; +}; + /* Initialize bufvec with a single buffer of given size */ #define FUSE_BUFVEC_INIT(size__) \ ((struct fuse_bufvec) { \ -- cgit v1.2.3