Skip to content

{bp-15077} fs/tmpfs: Skip any slash at the beginning of relpath#15087

Merged
xiaoxiang781216 merged 1 commit intoapache:releases/12.8from
jerpelea:bp-15077
Dec 9, 2024
Merged

{bp-15077} fs/tmpfs: Skip any slash at the beginning of relpath#15087
xiaoxiang781216 merged 1 commit intoapache:releases/12.8from
jerpelea:bp-15077

Conversation

@jerpelea
Copy link
Contributor

@jerpelea jerpelea commented Dec 9, 2024

Summary

tmpfs_stat() fails when relpath start with slash.

Log

Host
$ adb -s 1234 pull /tmp/subdir
adb: warning: skipping special file '/tmp/subdir/uname' (mode = 0o0)
/tmp/subdir/: 0 files pulled. 1 file skipped.

Device
state_process_list (411): stat failed </tmp/subdir//uname> -1 22

Ref: https://github.com/apache/nuttx/blame/master/libs/libc/stdlib/lib_realpath.c#L111

Note: Please adhere to Contributing Guidelines.

Impact

tmpfs

Testing

Selftest with esp32s3-devkit:adb with TMPFS enabled.
NuttX CI

`tmpfs_stat()` fails when relpath start with slash.

Log

  Host
    $ adb -s 1234 pull /tmp/subdir
    adb: warning: skipping special file '/tmp/subdir/uname' (mode = 0o0)
    /tmp/subdir/: 0 files pulled. 1 file skipped.

  Device
    state_process_list (411): stat failed </tmp/subdir//uname> -1 22

Ref: https://github.com/apache/nuttx/blame/master/libs/libc/stdlib/lib_realpath.c#L111
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
@github-actions github-actions bot added Area: File System File System issues Size: XS The size of the change in this PR is very small labels Dec 9, 2024
@jerpelea jerpelea changed the title fs/tmpfs: Skip any slash at the beginning of relpath {bp-15077} fs/tmpfs: Skip any slash at the beginning of relpath Dec 9, 2024
@xiaoxiang781216 xiaoxiang781216 merged commit 7562aff into apache:releases/12.8 Dec 9, 2024
@jerpelea jerpelea deleted the bp-15077 branch June 23, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: File System File System issues Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants