-
Notifications
You must be signed in to change notification settings - Fork 99
move user filesystem override to the top of the ports check #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reorders the checks in the ports header to ensure that a user-defined filesystem (WOLFSSH_USER_FILESYSTEM) takes precedence over other filesystem macros when compiling for specific devices. Key changes include adding a new condition block in wolfssh/port.h for user filesystem support and adjusting the filesystem condition in src/port.c to skip default filesystem code when a user filesystem is defined.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| wolfssh/port.h | Moves the WOLFSSH_USER_FILESYSTEM condition to a higher priority and includes "myFilesystem.h" |
| src/port.c | Adjusts the conditional to bypass default filesystem code when WOLFSSH_USER_FILESYSTEM is set |
Comments suppressed due to low confidence (1)
src/port.c:663
- The updated condition cleanly excludes the block when WOLFSSH_USER_FILESYSTEM is defined; please ensure that this logic aligns with all intended filesystem support use cases.
#if !defined(NO_FILESYSTEM) && !defined(WOLFSSH_USER_FILESYSTEM)
|
Used this exmaple to check filesystem override wolfSSL/wolfssh-examples#10 |
ejohnstown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In port.h changed the guard WOLFSSH_USER_FILESYSTEM to have a higher priority than WOLFSSH_NUCLEUS. In wolfsftp.c, the user filesystem has a lower priority now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed the Espressif echoserver still compiles and successfully acts like an echo server on an ESP32.
This changes WOLFSSH_USER_FILESYSTEM to take precedence over other port macros. For cases where building for devices like PIC32 and using MPLAB but still wanting to override the file system used.