]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fuse2fs: fix old libfuse compatibility issue
authorAllison Karlitskaya <allison.karlitskaya@redhat.com>
Mon, 26 May 2025 18:38:16 +0000 (20:38 +0200)
committerAllison Karlitskaya <allison.karlitskaya@redhat.com>
Mon, 26 May 2025 18:44:31 +0000 (20:44 +0200)
We only have the 'cfg' parameter defined here #if FUSE_VERSION >=
FUSE_MAKE_VERSION(3, 0), so only attempt to access it in that case as
well.

In particular, this fixes an issue when building on the GitHub Actions
runners.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
misc/fuse2fs.c

index 71dbdc1a17368c780a5a633373b5c499fd77e205..b26303a248df2c1450cf28432031515c6103de3e 100644 (file)
@@ -759,6 +759,8 @@ static void *op_init(struct fuse_conn_info *conn
 #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
        conn->time_gran = 1;
        cfg->use_ino = 1;
+       if (ff->debug)
+               cfg->debug = 1;
 #endif
        if (fs->flags & EXT2_FLAG_RW) {
                fs->super->s_mnt_count++;
@@ -769,8 +771,6 @@ static void *op_init(struct fuse_conn_info *conn
                if (err)
                        translate_error(fs, 0, err);
        }
-       if (ff->debug)
-               cfg->debug = 1;
 
        if (ff->kernel) {
                char uuid[UUID_STR_SIZE];