]> www.infradead.org Git - users/hch/xfsprogs.git/commit
libxfs: port IS_ENABLED from the kernel
authorDarrick J. Wong <djwong@kernel.org>
Tue, 15 Oct 2024 19:43:38 +0000 (12:43 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:44:39 +0000 (13:44 -0700)
commitfb8459cba87c1ada13c6b6eb285717f44353dce6
tree0711b2989b39d1576537a98a35cc1154b12eaacb
parentb31f54899934e1d8c0f86ec4c3c75b2031a8370e
libxfs: port IS_ENABLED from the kernel

Port the IS_ENABLED macro from the kernel so that it can be used in
libxfs.  This requires a bit of hygiene on our part -- any CONFIG_XFS_*
define in userspace that have counterparts in the kernel must be defined
to 1 (and not simply define'd) so that the macro works, because the
kernel translates CONFIG_FOO=y in .config to #define CONFIG_FOO 1.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/libxfs.h
include/platform_defs.h
libxfs/libxfs_priv.h