summaryrefslogtreecommitdiff
path: root/lib/helper.c
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2023-02-19 12:52:52 +0100
committerNikolaus Rath <Nikolaus@rath.org>2023-02-20 10:14:17 +0000
commit2da03e389866835e29b78a4546c6f1f87aab8fe1 (patch)
tree956f5d41c2801f04dd728ccb41f32953b7fb8c64 /lib/helper.c
parentdf2cde25a6eb0ced31764b8807c639c5f4099fd4 (diff)
downloadfuse-2da03e389866835e29b78a4546c6f1f87aab8fe1.tar.gz
Avoid max-idle threads warning
If a program with API before 312 did not set max_idle_threads the new default from fuse_parse_cmdline_312() is applied, which sets UINT_MAX (-1). Later in compat fuse_session_loop_mt_32 the old config v1 struct is converted and that conversion prints a warning if the default unset value was used. This could have also happened to programs using the current API, which just apply values struct fuse_cmdline_opts, without checking if the defaults are set.
Diffstat (limited to 'lib/helper.c')
-rw-r--r--lib/helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/helper.c b/lib/helper.c
index b270b85..35c6a98 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -210,7 +210,7 @@ int fuse_parse_cmdline_312(struct fuse_args *args,
{
memset(opts, 0, sizeof(struct fuse_cmdline_opts));
- opts->max_idle_threads = -1; /* new default in fuse version 3.12 */
+ opts->max_idle_threads = UINT_MAX; /* new default in fuse version 3.12 */
opts->max_threads = 10;
if (fuse_opt_parse(args, opts, fuse_helper_opts,
@@ -239,7 +239,6 @@ int fuse_parse_cmdline_30(struct fuse_args *args,
{
struct fuse_cmdline_opts opts;
-
int rc = fuse_parse_cmdline_312(args, &opts);
if (rc == 0) {
/* copy up to the size of the old pre 3.12 struct */