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

Identify inability to open a switch, avoid nil dereference #102

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

roehrich-hpe
Copy link
Contributor

In the case where we cannot open a /dev/switchtecX device, give a useful panic message rather than just dereferencing a nil pointer.

Earlier in the log there will be an error stating "Error opening path", and another stating "Failed to identify switch". The nil deference was happening much later, so it was not obviously connected to those.

See NearNodeFlash/NearNodeFlash.github.io#178 for more details.

In the case where we cannot open a /dev/switchtecX device, give a useful
panic message rather than just dereferencing a nil pointer.

Earlier in the log there will be an error stating "Error opening path", and
another stating "Failed to identify switch". The nil deference was happening
much later, so it was not obviously connected to those.

See NearNodeFlash/NearNodeFlash.github.io#178
for more details.

Signed-off-by: Dean Roehrich <[email protected]>
@roehrich-hpe roehrich-hpe merged commit 34d1295 into master Jul 8, 2024
2 checks passed
@roehrich-hpe roehrich-hpe deleted the err-open-switch branch July 8, 2024 18:33
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