From 24f5b129c4e1b03ebbd05ac0c7673f306facea1a Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Sat, 28 Dec 2024 15:10:03 +0100 Subject: Add 64-bit conn::{capable,want}_ext fields The previous fields are left for ABI compatibility, although it is not beautiful to add that complexity when we have to increase the so-version as we had ABI breakage anyway. example/printcap is simplified to use an array, as every line would have needed to be modified anyway. Missing 'FUSE_CAP_PASSTHROUGH' was added. Signed-off-by: Bernd Schubert --- example/passthrough_ll.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'example/passthrough_ll.c') diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c index 309d8dd..5f1fde9 100644 --- a/example/passthrough_ll.c +++ b/example/passthrough_ll.c @@ -168,18 +168,20 @@ static bool lo_debug(fuse_req_t req) static void lo_init(void *userdata, struct fuse_conn_info *conn) { - struct lo_data *lo = (struct lo_data*) userdata; - - if (lo->writeback && - conn->capable & FUSE_CAP_WRITEBACK_CACHE) { - if (lo->debug) - fuse_log(FUSE_LOG_DEBUG, "lo_init: activating writeback\n"); - conn->want |= FUSE_CAP_WRITEBACK_CACHE; + struct lo_data *lo = (struct lo_data *)userdata; + bool has_flag; + + if (lo->writeback) { + has_flag = fuse_set_feature_flag(conn, FUSE_CAP_WRITEBACK_CACHE); + if (lo->debug && has_flag) + fuse_log(FUSE_LOG_DEBUG, + "lo_init: activating writeback\n"); } if (lo->flock && conn->capable & FUSE_CAP_FLOCK_LOCKS) { - if (lo->debug) - fuse_log(FUSE_LOG_DEBUG, "lo_init: activating flock locks\n"); - conn->want |= FUSE_CAP_FLOCK_LOCKS; + has_flag = fuse_set_feature_flag(conn, FUSE_CAP_FLOCK_LOCKS); + if (lo->debug && has_flag) + fuse_log(FUSE_LOG_DEBUG, + "lo_init: activating flock locks\n"); } /* Disable the receiving and processing of FUSE_INTERRUPT requests */ -- cgit v1.2.3