mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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:
parent
778f7f00cb
commit
6fa47d6de4
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue