glusterd/snapshot: allow overriding ZFS_COMMAND at build time - #4778
Open
ThalesBarretto wants to merge 1 commit into
Open
ThalesBarretto wants to merge 1 commit into
ThalesBarretto wants to merge 1 commit into
Conversation
ZFS_COMMAND hardcodes the absolute /sbin/zfs path. Wrap it in an #ifndef guard so the default is preserved but a packager can override it via CPPFLAGS (-DZFS_COMMAND='"/usr/sbin/zfs"'), matching the _PATH_UMOUNT / _PATH_SETFATTR idiom already used in the tree. Also, enforce the lone excption: glusterd_zfs_dataset() spelled the "zfs list" command as a bare "zfs" string. Use ZFS_COMMAND there too, so all ites in the file share a single definition of the command. Signed-off-by: Thales Antunes de Oliveira Barretto <thales.barretto.git@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
glusterd/snapshot: make the zfs tool path consistent and overridable
Wrap ZFS_COMMAND in an
#ifndefguard so a packager can override viaCPPFLAGS(
-DZFS_COMMAND='"/usr/sbin/zfs"') idiom already used in the tree.The outlier
glusterd_zfs_dataset()spelled thezfs listcommand as a bare string,which is now routed through
ZFS_COMMANDtoo, so all sites share one definition.Fixes: #4777