Skip to content
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

Check for config #1142

Closed
wants to merge 7 commits into from
Closed

Check for config #1142

wants to merge 7 commits into from

Conversation

bdring
Copy link
Owner

@bdring bdring commented Feb 20, 2024

Gives a config error and message if not configured.

@bdring bdring requested a review from MitchBradley February 22, 2024 17:00
Copy link
Collaborator

@MitchBradley MitchBradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to move the is configured check down deeper so it automatically applies to anything that tries to use the sd? Like maybe the FluidPath constructor?

Copy link
Collaborator

@MitchBradley MitchBradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And "primary sd:none" in ShowFwInfo()

if (fs == sdName && !config->_sdCard->is_configured(out)) {
return Error::InvalidStatement;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another reason for putting the check in FluidPath is that the fs argument to renameObject and friends is just the default, which can be overridden with an explicit prefix like /localfs/ or /sd/ . Thus checking based on fs == sdName will fail to catch some uses of SD, and will wrongly complain if the sd default is overridden via an explicit /localfs/ prefix in the parameter.

Using Filepath wherever practical
added parameter checking
@bdring bdring closed this Mar 11, 2024
@bdring bdring deleted the NoSdConfig branch March 18, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants