nuttx/fs
Justin Hammond 8f23897d03 fs/fat: Restore the no-short-name marker when the name will not shorten.
fat_path2dirname() marks a parsed name as needing long file name
entries by clearing the first byte of the short name buffer, and
fat_dirnamewrite() writes the long name entries only while that marker
survives.  Since commit bc9e1ffb01, a name short enough to fit the 8.3
form is speculatively re-parsed as a short name, and the re-parse
fills the short name buffer with spaces before it examines a single
character.  When it then rejects the name (lower case, for example) the
spaces stay behind, the marker is gone, and the file is created with
eleven spaces for a name: no long name entries, a blank alias.

Every such file aliases to every other, since every rejected name
converts to the same blank entry.  Create a.txt, then create big1, and
both names now open one file; a directory of them lists as a single
nameless entry.  Any application that writes two lowercase short-named
files and reads the first back gets the second's contents.

Restore the marker when the speculative parse fails.

Tested on FAT32 with CONFIG_FAT_LFN: lower case, upper case, mixed
case and over-length names now create distinct, correctly named
entries that survive unmount and reboot; upper case 8.3 names still
produce plain short entries with no long name chain.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-08-08 10:05:43 +02:00
..
aio !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
binfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
cromfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
driver libs/libc: Fix divide-by-zero in stat() with large filesystem block sizes 2026-07-16 23:37:22 +08:00
event fs/event/open: fix the inode information update outside of lock 2026-01-28 10:03:06 +08:00
fat fs/fat: Restore the no-short-name marker when the name will not shorten. 2026-08-08 10:05:43 +02:00
hostfs fs/hostfs: Use configured path length 2026-07-23 15:34:02 +08:00
inode fs: enforce path search and unify inode permission helpers 2026-08-02 18:48:40 -03:00
littlefs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
mmap !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
mnemofs fs/mnemofs: Add mnemofs version 1 support. 2026-05-19 10:29:11 +08:00
mount fs: enforce path search and unify inode permission helpers 2026-08-02 18:48:40 -03:00
mqueue fs: enforce permission checks when opening IPC pseudo-inodes 2026-07-30 09:48:10 +08:00
nfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
nxffs fs/vfs: Add ioctldir for volume ioctls via the mountpoint directory. 2026-07-25 07:28:22 -03:00
partition fs/partition: bound TXTABLE partition names 2026-07-06 07:51:46 +02:00
procfs fs/procfs: fix incorrect environ read for another task under CONFIG_ARCH_ADDRENV 2026-07-11 12:43:10 -03:00
romfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
rpmsgfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
semaphore fs: enforce permission checks when opening IPC pseudo-inodes 2026-07-30 09:48:10 +08:00
shm fs: enforce permission checks when opening IPC pseudo-inodes 2026-07-30 09:48:10 +08:00
smartfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
socket include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
spiffs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
tmpfs fs: enforce path search and unify inode permission helpers 2026-08-02 18:48:40 -03:00
unionfs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
userfs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
v9fs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
vfs fs/pseudofile: fix buffer sizing and sparse growth. 2026-08-07 10:49:43 -04:00
xipfs fs/xipfs: Add a contiguous execute-in-place file system. 2026-07-29 07:49:03 -03:00
zipfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
CMakeLists.txt fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_heap.c mm/mm_heap: use struct mm_heap_config_s to init the memory heap 2026-01-19 14:18:27 +08:00
fs_heap.h fs_heap:add fs_heap_mallinfo_task 2025-01-15 17:12:50 +08:00
fs_initialize.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Kconfig fs/xipfs: Add a contiguous execute-in-place file system. 2026-07-29 07:49:03 -03:00
Makefile fs/xipfs: Add a contiguous execute-in-place file system. 2026-07-29 07:49:03 -03:00