diff options
author | Bernd Schubert <bschubert@ddn.com> | 2023-02-19 12:52:52 +0100 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2023-02-20 10:14:17 +0000 |
commit | 2da03e389866835e29b78a4546c6f1f87aab8fe1 (patch) | |
tree | 956f5d41c2801f04dd728ccb41f32953b7fb8c64 /lib/fuse_loop_mt.c | |
parent | df2cde25a6eb0ced31764b8807c639c5f4099fd4 (diff) | |
download | libfuse-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/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index cf9ad86..0200d73 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -464,9 +464,11 @@ void fuse_loop_cfg_set_idle_threads(struct fuse_loop_config *config, unsigned int value) { if (value > FUSE_LOOP_MT_MAX_THREADS) { - fuse_log(FUSE_LOG_ERR, - "Ignoring invalid max threads value " - "%u > max (%u).\n", value, FUSE_LOOP_MT_MAX_THREADS); + if (value != UINT_MAX) + fuse_log(FUSE_LOG_ERR, + "Ignoring invalid max threads value " + "%u > max (%u).\n", value, + FUSE_LOOP_MT_MAX_THREADS); return; } config->max_idle_threads = value; |