diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-03 10:41:51 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-23 08:11:42 +0100 |
commit | 3344b839df8fe2dd2b4a4f470225e4c407cf2faa (patch) | |
tree | a64c86cfe6adc5718143f5604fef893cfd94a865 /src/core | |
parent | 7d729de3a70bc7a7fef69f5cea03fcbf835e118a (diff) |
build-sys: use #if Y instead of #ifdef Y everywhere
The advantage is that is the name is mispellt, cpp will warn us.
$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build
squash! build-sys: use #if Y instead of #ifdef Y everywhere
v2:
- fix incorrect setting of HAVE_LIBIDN2
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/mount-setup.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index a2c5ea1a9..4a5a22f9b 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -67,7 +67,7 @@ typedef struct MountPoint { * fourth (securityfs) is needed by IMA to load a custom policy. The * other ones we can delay until SELinux and IMA are loaded. When * SMACK is enabled we need smackfs, too, so it's a fifth one. */ -#ifdef HAVE_SMACK +#if HAVE_SMACK #define N_EARLY_MOUNT 5 #else #define N_EARLY_MOUNT 4 @@ -83,7 +83,7 @@ static const MountPoint mount_table[] = { NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL, MNT_NONE }, -#ifdef HAVE_SMACK +#if HAVE_SMACK { "smackfs", "/sys/fs/smackfs", "smackfs", "smackfsdef=*", MS_NOSUID|MS_NOEXEC|MS_NODEV, mac_smack_use, MNT_FATAL }, { "tmpfs", "/dev/shm", "tmpfs", "mode=1777,smackfsroot=*", MS_NOSUID|MS_NODEV|MS_STRICTATIME, @@ -93,7 +93,7 @@ static const MountPoint mount_table[] = { NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, NULL, MNT_IN_CONTAINER }, -#ifdef HAVE_SMACK +#if HAVE_SMACK { "tmpfs", "/run", "tmpfs", "mode=755,smackfsroot=*", MS_NOSUID|MS_NODEV|MS_STRICTATIME, mac_smack_use, MNT_FATAL }, #endif @@ -117,7 +117,7 @@ static const MountPoint mount_table[] = { cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER }, { "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL, MNT_NONE }, -#ifdef ENABLE_EFI +#if ENABLE_EFI { "efivarfs", "/sys/firmware/efi/efivars", "efivarfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, is_efi_boot, MNT_NONE }, #endif @@ -351,7 +351,7 @@ int mount_cgroup_controllers(char ***join_controllers) { return 0; } -#if defined(HAVE_SELINUX) || defined(HAVE_SMACK) +#if HAVE_SELINUX || HAVE_SMACK static int nftw_cb( const char *fpath, const struct stat *sb, @@ -384,7 +384,7 @@ int mount_setup(bool loaded_policy) { return r; #if 0 /// elogind does not control /, /dev, /run and /run/systemd/* are setup elsewhere. -#if defined(HAVE_SELINUX) || defined(HAVE_SMACK) +#if HAVE_SELINUX || HAVE_SMACK /* Nodes in devtmpfs and /run need to be manually updated for * the appropriate labels, after mounting. The other virtual * API file systems like /sys and /proc do not need that, they |