fs/hostfs: Use configured path length

hostfs keeps its own HOSTFS_MAX_PATH wrapper for internal buffers, but
it should not hard-code a path length separate from the system path
configuration.

Define HOSTFS_MAX_PATH from PATH_MAX instead. PATH_MAX is backed by
CONFIG_PATH_MAX, whose default remains 256, so the default hostfs
behavior does not change while configurations that choose a larger path
limit are honored consistently.

Assisted-by: Claude:Claude-Fable-5
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2026-07-17 16:01:25 +08:00 committed by Xiang Xiao
parent 778f7f00cb
commit 6fa47d6de4

View file

@ -29,6 +29,7 @@
#include <nuttx/config.h>
#include <limits.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
@ -37,7 +38,7 @@
* Pre-processor Definitions
****************************************************************************/
#define HOSTFS_MAX_PATH 256
#define HOSTFS_MAX_PATH PATH_MAX
/****************************************************************************
* Public Types