-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Check for config #1142
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.
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?
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.
And "primary sd:none" in ShowFwInfo()
if (fs == sdName && !config->_sdCard->is_configured(out)) { | ||
return Error::InvalidStatement; | ||
} | ||
|
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.
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.
Gives a config error and message if not configured.