move user filesystem override to the top of the ports check#805
move user filesystem override to the top of the ports check#805ejohnstown merged 5 commits intowolfSSL:masterfrom
Conversation
There was a problem hiding this comment.
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.
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.
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.