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

zfs: tidy up Linux-specific code #3013

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dswarbrick
Copy link
Contributor

Group all Linux-specific zfs collector code in the already-existing zfs_linux.go, and move arch-agnostic init() function out of arch-specific files.

Avoid Linux-specific code scattered in two places by moving it to the
already-existing zfs_linux.go.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Code does not modify zfsPoolStatesName slice, so make it an array.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Ensure identical factory function name across arch-specific files so
that the common init() function in zfs.go works.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Also add build-tags to ensure it is ignored on non-relevant archs.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

2 participants