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

Libipmctl package initializes even if there is an error. #2721

Closed
Creatone opened this issue Nov 10, 2020 · 0 comments · Fixed by #2723
Closed

Libipmctl package initializes even if there is an error. #2721

Creatone opened this issue Nov 10, 2020 · 0 comments · Fixed by #2723

Comments

@Creatone
Copy link
Collaborator

func init() {
nvmLibMutex.Lock()
defer nvmLibMutex.Unlock()
cErr := C.nvm_init()
if cErr != C.NVM_SUCCESS {
// Unfortunately klog does not seem to work here. I believe it's better to
// output information using fmt rather then let it disappear silently.
fmt.Printf("libipmctl initialization failed with status %d", cErr)
}
isNVMLibInitialized = true
}

If there is an error with libipmctl initialization it's only printed and isNVMLibInitialized is always set.

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 a pull request may close this issue.

1 participant