Skip to content

Conversation

@JacobBarthelmeh
Copy link
Contributor

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.

Copy link

Copilot AI left a 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)

@JacobBarthelmeh
Copy link
Contributor Author

Used this exmaple to check filesystem override wolfSSL/wolfssh-examples#10

dgarske
dgarske previously approved these changes Jun 12, 2025
@ejohnstown ejohnstown self-requested a review June 12, 2025 18:58
ejohnstown

This comment was marked as resolved.

@ejohnstown ejohnstown self-requested a review June 12, 2025 19:03
Copy link
Contributor

@ejohnstown ejohnstown left a 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.

Copy link
Contributor

@gojimmypi gojimmypi left a 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.

@ejohnstown ejohnstown merged commit b19ecb5 into wolfSSL:master Jun 17, 2025
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants