]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fuse2fs: fix cache size parsing
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 May 2025 22:35:57 +0000 (15:35 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 23 May 2025 05:10:10 +0000 (01:10 -0400)
Fix the cache size parsing of "cache_size=%s" -- the "%" is at position
11, not 12.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174786677621.1383760.4131011398253369305.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index d4aeb6ae63e85f5a5b15a66ab089cd89e321653c..5c4ce4506f1c17565b2d1237098cfb0c80a04bf7 100644 (file)
@@ -3821,7 +3821,7 @@ static int fuse2fs_opt_proc(void *data, const char *arg,
                }
                return 1;
        case FUSE2FS_CACHE_SIZE:
-               ff->cache_size = parse_num_blocks2(arg + 12, -1);
+               ff->cache_size = parse_num_blocks2(arg + 11, -1);
                if (ff->cache_size < 1 || ff->cache_size > INT32_MAX) {
                        fprintf(stderr, "%s: %s\n", arg,
  _("cache size must be between 1 block and 2GB."));