]> granicus.if.org Git - strace/commitdiff
Fix preprocessor indentation
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 30 Dec 2018 15:35:21 +0000 (15:35 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 30 Dec 2018 15:35:21 +0000 (15:35 +0000)
Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done

204 files changed:
arch_defs.h
block.c
bpf_attr.h
bpf_filter.h
bpf_fprog.h
btrfs.c
cacheflush.c
defs.h
delay.h
dm.c
error_prints.h
evdev.c
evdev_mpers.c
f_owner_ex.h
filter.h
flock.h
gcc_compat.h
get_personality.h
ipc_defs.h
kernel_types.h
keyctl_kdf_params.h
kill_save_errno.h
kvm.c
largefile_wrappers.h
linux/aarch64/raw_syscall.h
linux/alpha/raw_syscall.h
linux/arc/raw_syscall.h
linux/arm/raw_syscall.h
linux/asm_stat.h
linux/avr32/raw_syscall.h
linux/bfin/raw_syscall.h
linux/bfin/rt_sigframe.h
linux/dummy.h
linux/hppa/raw_syscall.h
linux/hppa/rt_sigframe.h
linux/i386/raw_syscall.h
linux/i386/rt_sigframe.h
linux/ia64/raw_syscall.h
linux/ia64/rt_sigframe.h
linux/inet_diag.h
linux/m68k/raw_syscall.h
linux/m68k/rt_sigframe.h
linux/metag/raw_syscall.h
linux/microblaze/raw_syscall.h
linux/mips/raw_syscall.h
linux/mips/rt_sigframe.h
linux/netlink_diag.h
linux/nios2/arch_regs.c
linux/nios2/raw_syscall.h
linux/or1k/raw_syscall.h
linux/packet_diag.h
linux/powerpc/arch_rt_sigframe.c
linux/powerpc/raw_syscall.h
linux/powerpc64/arch_rt_sigframe.c
linux/riscv/raw_syscall.h
linux/rt_sigframe.h
linux/s390/raw_syscall.h
linux/s390/rt_sigframe.h
linux/sh/raw_syscall.h
linux/sh64/rt_sigframe.h
linux/smc_diag.h
linux/sock_diag.h
linux/sparc/raw_syscall.h
linux/sparc/rt_sigframe.h
linux/sparc64/arch_rt_sigframe.c
linux/sparc64/raw_syscall.h
linux/syscall.h
linux/tile/raw_syscall.h
linux/tile/rt_sigframe.h
linux/unix_diag.h
linux/x86_64/arch_get_personality.c
linux/x86_64/asm_stat.h
linux/x86_64/get_scno.c
linux/x86_64/raw_syscall.h
linux/xtensa/raw_syscall.h
loop.c
lseek.c
macros.h
mmap_cache.h
mmap_notify.h
mpers_type.h
msghdr.h
nbd_ioctl.c
negated_errno.h
net.c
netlink.h
netlink_kobject_uevent.h
netlink_route.h
netlink_smc_diag.c
netlink_sock_diag.h
nlattr.h
nsfs.h
nsig.h
number_set.h
or1k_atomic.c
perf.c
perf_event_struct.h
perf_ioctl.c
print_fields.h
print_sg_req_info.c
printsiginfo.c
printsiginfo.h
process.c
ptrace.h
ptrace_syscall_info.h
random_ioctl.c
regs.h
retval.h
rt_sigframe.c
rtnl_link.c
rtnl_neightbl.c
s390.c
sched_attr.h
sg_io_v3.c
sg_io_v4.c
sigevent.h
signal.c
sock.c
socketutils.c
sram_alloc.c
stat.h
statfs.h
static_assert.h [changed mode: 0755->0644]
statx.h
strace.c
string_to_uint.h
syscall.c
sysent.h
sysmips.c
test/skodic.c
test/threaded_execve.c
tests/accept_compat.h
tests/bpf-obj_get_info_by_fd.c
tests/btrfs.c
tests/chmod.c
tests/execveat.c
tests/fadvise.h
tests/fanotify_mark.c
tests/fcntl.c
tests/file_handle.c
tests/getgroups.c
tests/group_req.c
tests/init_delete_module.h
tests/ioctl.c
tests/ioctl_dm.c
tests/ioctl_evdev.c
tests/ioctl_kvm_run_common.c
tests/ioctl_loop.c
tests/ioctl_nbd.c
tests/ioctl_perf.c
tests/ioctl_ptp.c
tests/ioctl_random.c
tests/ioctl_uffdio.c
tests/ioctl_v4l2.c
tests/ip_mreq.c
tests/ipc_shm.c
tests/kexec_file_load.c
tests/keyctl.c
tests/libsocketcall.c
tests/mmsg_name.c
tests/modify_ldt.c
tests/mq_sendrecv.c
tests/net-sockaddr.c
tests/netlink_protocol.c
tests/nlattr_crypto_user_alg.c
tests/nlattr_fib_rule_hdr.c
tests/nlattr_ifinfomsg.c
tests/nlattr_ifla.h
tests/nlattr_ifla_af_spec.c
tests/nlattr_ifla_linkinfo.c
tests/nlattr_ndtmsg.c
tests/nlattr_tc_stats.c
tests/oldselect-efault.c
tests/openat.c
tests/perf_event_open.c
tests/perf_event_open_nonverbose.c
tests/poll.c
tests/prctl-seccomp-filter-v.c
tests/preadv2-pwritev2.c
tests/quotactl.c
tests/quotactl.h
tests/remap_file_pages.c
tests/restart_syscall.c
tests/rt_sigpending.c
tests/seccomp-filter-v.c
tests/sethostname.c
tests/sigaction.c
tests/sigsuspend.c
tests/stack-fcall.h
tests/tests.h
tests/timer_create.c
tests/utimensat.c
tests/xstatx.c
trace_event.h
unwind.h
userfaultfd.c
util.c
v4l2.c
wait.h
xlat.h
xlat/mmap_flags.in
xlat/open_mode_flags.in
xmalloc.h
xstring.h

index 19ca4a852d5e84cbe473150725162fd62d8e1ea1..40e675f36859b14197b50c8d2e398406016c9d9d 100644 (file)
@@ -7,9 +7,9 @@
 
 /* Architecture-specific definitions.  */
 #ifndef STRACE_ARCH_DEFS_H
-#define STRACE_ARCH_DEFS_H
+# define STRACE_ARCH_DEFS_H
 
-#include "arch_defs_.h"
-#include "linux/arch_defs_.h"
+# include "arch_defs_.h"
+# include "linux/arch_defs_.h"
 
 #endif /* !STRACE_ARCH_DEFS_H */
diff --git a/block.c b/block.c
index af0945fc3c0c0223c0b78a9c12619929d60725ad..893269d095bf626d49c600334db461a838d7ed24 100644 (file)
--- a/block.c
+++ b/block.c
@@ -47,7 +47,7 @@ typedef struct blk_user_trace_setup {
 
 /* Provide fall-back definitions for BLK* ioctls */
 #define XLAT_MACROS_ONLY
-# include "xlat/block_ioctl_cmds.h"
+#include "xlat/block_ioctl_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #include MPERS_DEFS
index 925221df1ec4e251320db7afab8619245a93628d..dc7694ccf095a54c3d2ac95b521e92779be82009 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_BPF_ATTR_H
-#define STRACE_BPF_ATTR_H
+# define STRACE_BPF_ATTR_H
 
 /*
  * The policy is that all fields of type uint64_t in this header file
  * v4.16-rc1~123^2~109^2~5^2~4.
  */
 
-#ifndef BPF_OBJ_NAME_LEN
-# define BPF_OBJ_NAME_LEN 16U
-#else
-# if BPF_OBJ_NAME_LEN != 16U
-#  error "Unexpected value of BPF_OBJ_NAME_LEN"
+# ifndef BPF_OBJ_NAME_LEN
+#  define BPF_OBJ_NAME_LEN 16U
+# else
+#  if BPF_OBJ_NAME_LEN != 16U
+#   error "Unexpected value of BPF_OBJ_NAME_LEN"
+#  endif
 # endif
-#endif
 
-#ifndef BPF_TAG_SIZE
-# define BPF_TAG_SIZE 8
-#else
-# if BPF_TAG_SIZE != 8
-#  error "Unexpected value of BPF_TAG_SIZE"
+# ifndef BPF_TAG_SIZE
+#  define BPF_TAG_SIZE 8
+# else
+#  if BPF_TAG_SIZE != 8
+#   error "Unexpected value of BPF_TAG_SIZE"
+#  endif
 # endif
-#endif
 
 struct BPF_MAP_CREATE_struct {
        uint32_t map_type;
@@ -47,9 +47,9 @@ struct BPF_MAP_CREATE_struct {
        uint32_t map_ifindex;
 };
 
-#define BPF_MAP_CREATE_struct_size \
+# define BPF_MAP_CREATE_struct_size \
        sizeof(struct BPF_MAP_CREATE_struct)
-#define expected_BPF_MAP_CREATE_struct_size 48
+# define expected_BPF_MAP_CREATE_struct_size 48
 
 struct BPF_MAP_LOOKUP_ELEM_struct {
        uint32_t map_fd;
@@ -57,9 +57,9 @@ struct BPF_MAP_LOOKUP_ELEM_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) value;
 };
 
-#define BPF_MAP_LOOKUP_ELEM_struct_size \
+# define BPF_MAP_LOOKUP_ELEM_struct_size \
        sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
-#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
+# define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
 
 struct BPF_MAP_UPDATE_ELEM_struct {
        uint32_t map_fd;
@@ -68,18 +68,18 @@ struct BPF_MAP_UPDATE_ELEM_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) flags;
 };
 
-#define BPF_MAP_UPDATE_ELEM_struct_size \
+# define BPF_MAP_UPDATE_ELEM_struct_size \
        sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
-#define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
+# define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
 
 struct BPF_MAP_DELETE_ELEM_struct {
        uint32_t map_fd;
        uint64_t ATTRIBUTE_ALIGNED(8) key;
 };
 
-#define BPF_MAP_DELETE_ELEM_struct_size \
+# define BPF_MAP_DELETE_ELEM_struct_size \
        sizeof(struct BPF_MAP_DELETE_ELEM_struct)
-#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
+# define expected_BPF_MAP_DELETE_ELEM_struct_size 16
 
 struct BPF_MAP_GET_NEXT_KEY_struct {
        uint32_t map_fd;
@@ -87,9 +87,9 @@ struct BPF_MAP_GET_NEXT_KEY_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) next_key;
 };
 
-#define BPF_MAP_GET_NEXT_KEY_struct_size \
+# define BPF_MAP_GET_NEXT_KEY_struct_size \
        sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
-#define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
+# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
 
 struct BPF_PROG_LOAD_struct {
        uint32_t prog_type;
@@ -106,9 +106,9 @@ struct BPF_PROG_LOAD_struct {
        uint32_t expected_attach_type;
 };
 
-#define BPF_PROG_LOAD_struct_size \
+# define BPF_PROG_LOAD_struct_size \
        offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
-#define expected_BPF_PROG_LOAD_struct_size 72
+# define expected_BPF_PROG_LOAD_struct_size 72
 
 struct BPF_OBJ_PIN_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) pathname;
@@ -116,12 +116,12 @@ struct BPF_OBJ_PIN_struct {
        uint32_t file_flags;
 };
 
-#define BPF_OBJ_PIN_struct_size \
+# define BPF_OBJ_PIN_struct_size \
        sizeof(struct BPF_OBJ_PIN_struct)
-#define expected_BPF_OBJ_PIN_struct_size 16
+# define expected_BPF_OBJ_PIN_struct_size 16
 
-#define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
-#define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
+# define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
+# define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
 
 struct BPF_PROG_ATTACH_struct {
        uint32_t target_fd;
@@ -130,9 +130,9 @@ struct BPF_PROG_ATTACH_struct {
        uint32_t attach_flags;
 };
 
-#define BPF_PROG_ATTACH_struct_size \
+# define BPF_PROG_ATTACH_struct_size \
        sizeof(struct BPF_PROG_ATTACH_struct)
-#define expected_BPF_PROG_ATTACH_struct_size 16
+# define expected_BPF_PROG_ATTACH_struct_size 16
 
 struct BPF_PROG_DETACH_struct {
        uint32_t target_fd;
@@ -140,9 +140,9 @@ struct BPF_PROG_DETACH_struct {
        uint32_t attach_type;
 };
 
-#define BPF_PROG_DETACH_struct_size \
+# define BPF_PROG_DETACH_struct_size \
        sizeof(struct BPF_PROG_DETACH_struct)
-#define expected_BPF_PROG_DETACH_struct_size 12
+# define expected_BPF_PROG_DETACH_struct_size 12
 
 struct BPF_PROG_TEST_RUN_struct /* test */ {
        uint32_t prog_fd;
@@ -155,9 +155,9 @@ struct BPF_PROG_TEST_RUN_struct /* test */ {
        uint32_t duration;
 };
 
-#define BPF_PROG_TEST_RUN_struct_size \
+# define BPF_PROG_TEST_RUN_struct_size \
        sizeof(struct BPF_PROG_TEST_RUN_struct)
-#define expected_BPF_PROG_TEST_RUN_struct_size 40
+# define expected_BPF_PROG_TEST_RUN_struct_size 40
 
 struct BPF_PROG_GET_NEXT_ID_struct {
        uint32_t start_id;
@@ -165,12 +165,12 @@ struct BPF_PROG_GET_NEXT_ID_struct {
        uint32_t open_flags;
 };
 
-#define BPF_PROG_GET_NEXT_ID_struct_size \
+# define BPF_PROG_GET_NEXT_ID_struct_size \
        sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
-#define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
+# define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
 
-#define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
-#define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
+# define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
+# define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
 
 struct BPF_PROG_GET_FD_BY_ID_struct {
        uint32_t prog_id;
@@ -178,9 +178,9 @@ struct BPF_PROG_GET_FD_BY_ID_struct {
        uint32_t open_flags;
 };
 
-#define BPF_PROG_GET_FD_BY_ID_struct_size \
+# define BPF_PROG_GET_FD_BY_ID_struct_size \
        sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
-#define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
+# define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
 
 struct BPF_MAP_GET_FD_BY_ID_struct {
        uint32_t map_id;
@@ -188,9 +188,9 @@ struct BPF_MAP_GET_FD_BY_ID_struct {
        uint32_t open_flags;
 };
 
-#define BPF_MAP_GET_FD_BY_ID_struct_size \
+# define BPF_MAP_GET_FD_BY_ID_struct_size \
        sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
-#define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
+# define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
 
 struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
        uint32_t bpf_fd;
@@ -198,9 +198,9 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
        uint64_t ATTRIBUTE_ALIGNED(8) info;
 };
 
-#define BPF_OBJ_GET_INFO_BY_FD_struct_size \
+# define BPF_OBJ_GET_INFO_BY_FD_struct_size \
        sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
-#define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
+# define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
 
 struct BPF_PROG_QUERY_struct /* query */ {
        uint32_t target_fd;
@@ -211,18 +211,18 @@ struct BPF_PROG_QUERY_struct /* query */ {
        uint32_t prog_cnt;
 };
 
-#define BPF_PROG_QUERY_struct_size \
+# define BPF_PROG_QUERY_struct_size \
        offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
-#define expected_BPF_PROG_QUERY_struct_size 28
+# define expected_BPF_PROG_QUERY_struct_size 28
 
 struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
        uint64_t ATTRIBUTE_ALIGNED(8) name;
        uint32_t prog_fd;
 };
 
-#define BPF_RAW_TRACEPOINT_OPEN_struct_size \
+# define BPF_RAW_TRACEPOINT_OPEN_struct_size \
        offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
-#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
+# define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
 
 struct bpf_map_info_struct {
        uint32_t type;
@@ -241,9 +241,9 @@ struct bpf_map_info_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
 };
 
-#define bpf_map_info_struct_size \
+# define bpf_map_info_struct_size \
        sizeof(struct bpf_map_info_struct)
-#define expected_bpf_map_info_struct_size 64
+# define expected_bpf_map_info_struct_size 64
 
 struct bpf_prog_info_struct {
        uint32_t type;
@@ -267,8 +267,8 @@ struct bpf_prog_info_struct {
        uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
 };
 
-#define bpf_prog_info_struct_size \
+# define bpf_prog_info_struct_size \
        sizeof(struct bpf_prog_info_struct)
-#define expected_bpf_prog_info_struct_size 104
+# define expected_bpf_prog_info_struct_size 104
 
 #endif /* !STRACE_BPF_ATTR_H */
index 23ae5b641be6adb6c86a921780dfa37495a5c488..b19384f876a4b2c282a99a531a31e8585bed08f5 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_BPF_FILTER_H
-#define STRACE_BPF_FILTER_H
+# define STRACE_BPF_FILTER_H
 
 struct bpf_filter_block {
        uint16_t code;
index ebf2d1ba2f1ddff7328070386939f7bb052d072c..3321531eaeb4e961fd39757efc600550f8d3af9c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_BPF_FPROG_H
-#define STRACE_BPF_FPROG_H
+# define STRACE_BPF_FPROG_H
 
 struct bpf_fprog {
        unsigned short len;
diff --git a/btrfs.c b/btrfs.c
index 4d8090182bfce85190119f357fa414346241c1fa..f3f9b920f89ef61a8bcd0988376a8547ff568963 100644 (file)
--- a/btrfs.c
+++ b/btrfs.c
 
 #ifdef HAVE_LINUX_BTRFS_H
 
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
 
 # include <linux/btrfs.h>
 
@@ -32,8 +32,8 @@ typedef struct btrfs_ioctl_vol_args_v2
 
 #ifdef HAVE_LINUX_BTRFS_H
 
-#include "print_fields.h"
-#include <linux/fs.h>
+# include "print_fields.h"
+# include <linux/fs.h>
 
 /*
  * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
@@ -41,15 +41,15 @@ typedef struct btrfs_ioctl_vol_args_v2
  */
 typedef __u64 u64;
 
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
 struct btrfs_ioctl_feature_flags {
        uint64_t compat_flags;
        uint64_t compat_ro_flags;
        uint64_t incompat_flags;
 };
-#endif
+# endif
 
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
 struct btrfs_ioctl_defrag_range_args {
        uint64_t start;
        uint64_t len;
@@ -58,37 +58,37 @@ struct btrfs_ioctl_defrag_range_args {
        uint32_t compress_type;
        uint32_t unused[4];
 };
-#endif
+# endif
 
-#ifndef BTRFS_LABEL_SIZE
-# define BTRFS_LABEL_SIZE 256
-#endif
+# ifndef BTRFS_LABEL_SIZE
+#  define BTRFS_LABEL_SIZE 256
+# endif
 
-#ifndef BTRFS_IOC_QUOTA_RESCAN
+# ifndef BTRFS_IOC_QUOTA_RESCAN
 struct btrfs_ioctl_quota_rescan_args {
        uint64_t flags, progress, reserved[6];
 };
-# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
+#  define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
                                        struct btrfs_ioctl_quota_rescan_args)
-# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
+#  define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
                                        struct btrfs_ioctl_quota_rescan_args)
-#endif
+# endif
 
-#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
-# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
-#endif
+# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
+#  define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
+# endif
 
-#ifndef BTRFS_IOC_GET_FEATURES
-# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
+# ifndef BTRFS_IOC_GET_FEATURES
+#  define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
                                        struct btrfs_ioctl_feature_flags)
-# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
+#  define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
                                        struct btrfs_ioctl_feature_flags[2])
-# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
+#  define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
                                        struct btrfs_ioctl_feature_flags[3])
-#endif
+# endif
 
-#ifndef BTRFS_IOC_TREE_SEARCH_V2
-# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
+# ifndef BTRFS_IOC_TREE_SEARCH_V2
+#  define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
                                        struct btrfs_ioctl_search_args_v2)
 struct btrfs_ioctl_search_args_v2 {
        struct btrfs_ioctl_search_key key; /* in/out - search parameters */
@@ -97,34 +97,34 @@ struct btrfs_ioctl_search_args_v2 {
                                            *       to store item */
        uint64_t buf[0];                   /* out - found items */
 };
-#endif
-
-#include "xlat/btrfs_balance_args.h"
-#include "xlat/btrfs_balance_ctl_cmds.h"
-#include "xlat/btrfs_balance_flags.h"
-#include "xlat/btrfs_balance_state.h"
-#include "xlat/btrfs_compress_types.h"
-#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
-#include "xlat/btrfs_defrag_flags.h"
-#include "xlat/btrfs_dev_replace_cmds.h"
-#include "xlat/btrfs_dev_replace_results.h"
-#include "xlat/btrfs_dev_replace_state.h"
-#include "xlat/btrfs_dev_stats_flags.h"
-#include "xlat/btrfs_dev_stats_values.h"
-#include "xlat/btrfs_features_compat.h"
-#include "xlat/btrfs_features_compat_ro.h"
-#include "xlat/btrfs_features_incompat.h"
-#include "xlat/btrfs_key_types.h"
-#include "xlat/btrfs_logical_ino_args_flags.h"
-#include "xlat/btrfs_qgroup_ctl_cmds.h"
-#include "xlat/btrfs_qgroup_inherit_flags.h"
-#include "xlat/btrfs_qgroup_limit_flags.h"
-#include "xlat/btrfs_qgroup_status_flags.h"
-#include "xlat/btrfs_scrub_flags.h"
-#include "xlat/btrfs_send_flags.h"
-#include "xlat/btrfs_snap_flags_v2.h"
-#include "xlat/btrfs_space_info_flags.h"
-#include "xlat/btrfs_tree_objectids.h"
+# endif
+
+# include "xlat/btrfs_balance_args.h"
+# include "xlat/btrfs_balance_ctl_cmds.h"
+# include "xlat/btrfs_balance_flags.h"
+# include "xlat/btrfs_balance_state.h"
+# include "xlat/btrfs_compress_types.h"
+# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
+# include "xlat/btrfs_defrag_flags.h"
+# include "xlat/btrfs_dev_replace_cmds.h"
+# include "xlat/btrfs_dev_replace_results.h"
+# include "xlat/btrfs_dev_replace_state.h"
+# include "xlat/btrfs_dev_stats_flags.h"
+# include "xlat/btrfs_dev_stats_values.h"
+# include "xlat/btrfs_features_compat.h"
+# include "xlat/btrfs_features_compat_ro.h"
+# include "xlat/btrfs_features_incompat.h"
+# include "xlat/btrfs_key_types.h"
+# include "xlat/btrfs_logical_ino_args_flags.h"
+# include "xlat/btrfs_qgroup_ctl_cmds.h"
+# include "xlat/btrfs_qgroup_inherit_flags.h"
+# include "xlat/btrfs_qgroup_limit_flags.h"
+# include "xlat/btrfs_qgroup_status_flags.h"
+# include "xlat/btrfs_scrub_flags.h"
+# include "xlat/btrfs_send_flags.h"
+# include "xlat/btrfs_snap_flags_v2.h"
+# include "xlat/btrfs_space_info_flags.h"
+# include "xlat/btrfs_tree_objectids.h"
 
 static inline char
 prnibble(char v)
@@ -135,7 +135,7 @@ prnibble(char v)
 }
 
 /* 8-4-4-4-12 = 36 characters */
-#define UUID_STRING_SIZE 36
+# define UUID_STRING_SIZE 36
 
 /* Formats uuid, returns 0 if it's all zeroes */
 static int
@@ -222,9 +222,9 @@ btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
        tprints("}");
 }
 
-#define btrfs_print_key_type(prefix_, where_, field_) \
+# define btrfs_print_key_type(prefix_, where_, field_) \
        PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
-#define btrfs_print_objectid(prefix_, where_, field_) \
+# define btrfs_print_objectid(prefix_, where_, field_) \
        PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
                           NULL)
 
@@ -718,9 +718,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                struct btrfs_ioctl_fs_info_args args;
                char uuid[UUID_STRING_SIZE+1];
                uint32_t nodesize, sectorsize, clone_alignment;
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
                uint32_t *reserved32;
-#endif
+# endif
 
                if (entering(tcp))
                        return 0;
@@ -729,16 +729,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                if (umove_or_printaddr(tcp, arg, &args))
                        break;
 
-#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
+# ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
                nodesize = args.nodesize,
                sectorsize = args.sectorsize,
                clone_alignment = args.clone_alignment;
-#else
+# else
                reserved32 = (void *) args.reserved;
                nodesize = reserved32[0];
                sectorsize = reserved32[1];
                clone_alignment = reserved32[2];
-#endif
+# endif
                btrfs_unparse_uuid(args.fsid, uuid);
 
                PRINT_FIELD_U("{", args, max_id);
@@ -892,11 +892,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
 
                        tprintf(", flags=");
                        printflags64(btrfs_logical_ino_args_flags,
-#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
+# ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
                                     args.flags
-#else
+# else
                                     args.reserved[3]
-#endif
+# endif
                                     , "BTRFS_LOGICAL_INO_ARGS_???");
                        PRINT_FIELD_ADDR64(", ", args, inodes);
                        tprints("}");
@@ -1262,9 +1262,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
 
        case BTRFS_IOC_CLONE:                   /* FICLONE */
        case BTRFS_IOC_CLONE_RANGE:             /* FICLONERANGE */
-#ifdef BTRFS_IOC_FILE_EXTENT_SAME
+# ifdef BTRFS_IOC_FILE_EXTENT_SAME
        case BTRFS_IOC_FILE_EXTENT_SAME:        /* FIDEDUPERANGE */
-#endif
+# endif
                /*
                 * FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
                 * btrfs ioctls and the code was kept for the generic
index 721af4ceba41e287ebd4be0f502eef64ada8d84e..f38a3f916e93e887b6bcbc83ff657a10c12e3361 100644 (file)
 # include "xlat/cacheflush_scope.h"
 
 static const struct xlat cacheflush_flags[] = {
-#ifdef FLUSH_CACHE_BOTH
+# ifdef FLUSH_CACHE_BOTH
        XLAT(FLUSH_CACHE_BOTH),
-#endif
-#ifdef FLUSH_CACHE_DATA
+# endif
+# ifdef FLUSH_CACHE_DATA
        XLAT(FLUSH_CACHE_DATA),
-#endif
-#ifdef FLUSH_CACHE_INSN
+# endif
+# ifdef FLUSH_CACHE_INSN
        XLAT(FLUSH_CACHE_INSN),
-#endif
+# endif
        XLAT_END
 };
 
@@ -72,18 +72,18 @@ SYS_FUNC(cacheflush)
 
 #ifdef SH
 static const struct xlat cacheflush_flags[] = {
-#ifdef CACHEFLUSH_D_INVAL
+# ifdef CACHEFLUSH_D_INVAL
        XLAT(CACHEFLUSH_D_INVAL),
-#endif
-#ifdef CACHEFLUSH_D_WB
+# endif
+# ifdef CACHEFLUSH_D_WB
        XLAT(CACHEFLUSH_D_WB),
-#endif
-#ifdef CACHEFLUSH_D_PURGE
+# endif
+# ifdef CACHEFLUSH_D_PURGE
        XLAT(CACHEFLUSH_D_PURGE),
-#endif
-#ifdef CACHEFLUSH_I
+# endif
+# ifdef CACHEFLUSH_I
        XLAT(CACHEFLUSH_I),
-#endif
+# endif
        XLAT_END
 };
 
diff --git a/defs.h b/defs.h
index c9bca4ed3975f153cebac0044e0b019751d248d3..f8db6124cf9128f443c8962b666743aa5e947d15 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -9,67 +9,67 @@
  */
 
 #ifndef STRACE_DEFS_H
-#define STRACE_DEFS_H
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <features.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
+# define STRACE_DEFS_H
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include <features.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <inttypes.h>
+# include <sys/types.h>
+# include <stddef.h>
+# include <unistd.h>
+# include <stdlib.h>
+# include <stdio.h>
 /* Open-coding isprint(ch) et al proved more efficient than calling
  * generalized libc interface. We don't *want* to do non-ASCII anyway.
  */
 /* #include <ctype.h> */
-#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/time.h>
-
-#include "arch_defs.h"
-#include "error_prints.h"
-#include "gcc_compat.h"
-#include "kernel_types.h"
-#include "macros.h"
-#include "mpers_type.h"
-#include "string_to_uint.h"
-#include "sysent.h"
-#include "xmalloc.h"
-
-#ifndef HAVE_STRERROR
+# include <string.h>
+# include <errno.h>
+# include <time.h>
+# include <sys/time.h>
+
+# include "arch_defs.h"
+# include "error_prints.h"
+# include "gcc_compat.h"
+# include "kernel_types.h"
+# include "macros.h"
+# include "mpers_type.h"
+# include "string_to_uint.h"
+# include "sysent.h"
+# include "xmalloc.h"
+
+# ifndef HAVE_STRERROR
 const char *strerror(int);
-#endif
-#ifndef HAVE_STPCPY
+# endif
+# ifndef HAVE_STPCPY
 /* Some libc have stpcpy, some don't. Sigh...
  * Roll our private implementation...
  */
-#undef stpcpy
-#define stpcpy strace_stpcpy
+#  undef stpcpy
+#  define stpcpy strace_stpcpy
 extern char *stpcpy(char *dst, const char *src);
-#endif
+# endif
 
 /* Glibc has an efficient macro for sigemptyset
  * (it just does one or two assignments of 0 to internal vector of longs).
  */
-#if defined(__GLIBC__) && defined(__sigemptyset) && !defined(sigemptyset)
-# define sigemptyset __sigemptyset
-#endif
+# if defined(__GLIBC__) && defined(__sigemptyset) && !defined(sigemptyset)
+#  define sigemptyset __sigemptyset
+# endif
 
 /* Configuration section */
-#ifndef DEFAULT_STRLEN
+# ifndef DEFAULT_STRLEN
 /* default maximum # of bytes printed in `printstr', change with -s switch */
-# define DEFAULT_STRLEN        32
-#endif
-#ifndef DEFAULT_ACOLUMN
-# define DEFAULT_ACOLUMN       40      /* default alignment column for results */
-#endif
+#  define DEFAULT_STRLEN       32
+# endif
+# ifndef DEFAULT_ACOLUMN
+#  define DEFAULT_ACOLUMN      40      /* default alignment column for results */
+# endif
 /*
  * Maximum number of args to a syscall.
  *
@@ -77,94 +77,94 @@ extern char *stpcpy(char *dst, const char *src);
  * linux/<ARCH>/syscallent*.h:
  *     all have nargs <= 6 except mips o32 which has nargs <= 7.
  */
-#ifndef MAX_ARGS
-# ifdef LINUX_MIPSO32
-#  define MAX_ARGS     7
-# else
-#  define MAX_ARGS     6
+# ifndef MAX_ARGS
+#  ifdef LINUX_MIPSO32
+#   define MAX_ARGS    7
+#  else
+#   define MAX_ARGS    6
+#  endif
 # endif
-#endif
 /* default sorting method for call profiling */
-#ifndef DEFAULT_SORTBY
-# define DEFAULT_SORTBY "time"
-#endif
+# ifndef DEFAULT_SORTBY
+#  define DEFAULT_SORTBY "time"
+# endif
 
 /* To force NOMMU build, set to 1 */
-#define NOMMU_SYSTEM 0
-
-#ifndef ERESTARTSYS
-# define ERESTARTSYS    512
-#endif
-#ifndef ERESTARTNOINTR
-# define ERESTARTNOINTR 513
-#endif
-#ifndef ERESTARTNOHAND
-# define ERESTARTNOHAND 514
-#endif
-#ifndef ERESTART_RESTARTBLOCK
-# define ERESTART_RESTARTBLOCK 516
-#endif
-
-#define PERSONALITY0_WORDSIZE  SIZEOF_LONG
-#define PERSONALITY0_KLONGSIZE SIZEOF_KERNEL_LONG_T
-#define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
-#define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
-
-#if SUPPORTED_PERSONALITIES > 1
-# define PERSONALITY1_WORDSIZE  4
-# define PERSONALITY1_KLONGSIZE PERSONALITY1_WORDSIZE
-#endif
-
-#if SUPPORTED_PERSONALITIES > 2
-# define PERSONALITY2_WORDSIZE  4
-# define PERSONALITY2_KLONGSIZE PERSONALITY0_KLONGSIZE
-#endif
-
-#if SUPPORTED_PERSONALITIES > 1 && defined HAVE_M32_MPERS
-# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
-# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
-# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
-# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
-# define HAVE_PERSONALITY_1_MPERS 1
-#else
-# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
-# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
-# define PERSONALITY1_INCLUDE_FUNCS "empty.h"
-# define HAVE_PERSONALITY_1_MPERS 0
-#endif
-
-#if SUPPORTED_PERSONALITIES > 2 && defined HAVE_MX32_MPERS
-# define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h"
-# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h"
-# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h"
-# define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h"
-# define HAVE_PERSONALITY_2_MPERS 1
-#else
-# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
-# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
-# define PERSONALITY2_INCLUDE_FUNCS "empty.h"
-# define HAVE_PERSONALITY_2_MPERS 0
-#endif
-
-#ifdef WORDS_BIGENDIAN
-# define is_bigendian true
-#else
-# define is_bigendian false
-#endif
+# define NOMMU_SYSTEM 0
+
+# ifndef ERESTARTSYS
+#  define ERESTARTSYS    512
+# endif
+# ifndef ERESTARTNOINTR
+#  define ERESTARTNOINTR 513
+# endif
+# ifndef ERESTARTNOHAND
+#  define ERESTARTNOHAND 514
+# endif
+# ifndef ERESTART_RESTARTBLOCK
+#  define ERESTART_RESTARTBLOCK 516
+# endif
+
+# define PERSONALITY0_WORDSIZE  SIZEOF_LONG
+# define PERSONALITY0_KLONGSIZE SIZEOF_KERNEL_LONG_T
+# define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
+# define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
+
+# if SUPPORTED_PERSONALITIES > 1
+#  define PERSONALITY1_WORDSIZE  4
+#  define PERSONALITY1_KLONGSIZE PERSONALITY1_WORDSIZE
+# endif
+
+# if SUPPORTED_PERSONALITIES > 2
+#  define PERSONALITY2_WORDSIZE  4
+#  define PERSONALITY2_KLONGSIZE PERSONALITY0_KLONGSIZE
+# endif
+
+# if SUPPORTED_PERSONALITIES > 1 && defined HAVE_M32_MPERS
+#  define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
+#  define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
+#  define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
+#  define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
+#  define HAVE_PERSONALITY_1_MPERS 1
+# else
+#  define PERSONALITY1_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
+#  define PERSONALITY1_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
+#  define PERSONALITY1_INCLUDE_FUNCS "empty.h"
+#  define HAVE_PERSONALITY_1_MPERS 0
+# endif
+
+# if SUPPORTED_PERSONALITIES > 2 && defined HAVE_MX32_MPERS
+#  define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h"
+#  define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h"
+#  define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h"
+#  define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h"
+#  define HAVE_PERSONALITY_2_MPERS 1
+# else
+#  define PERSONALITY2_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
+#  define PERSONALITY2_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
+#  define PERSONALITY2_INCLUDE_FUNCS "empty.h"
+#  define HAVE_PERSONALITY_2_MPERS 0
+# endif
+
+# ifdef WORDS_BIGENDIAN
+#  define is_bigendian true
+# else
+#  define is_bigendian false
+# endif
 
 typedef struct ioctlent {
        const char *symbol;
        unsigned int code;
 } struct_ioctlent;
 
-#define INJECT_F_SIGNAL                0x01
-#define INJECT_F_ERROR         0x02
-#define INJECT_F_RETVAL                0x04
-#define INJECT_F_DELAY_ENTER   0x08
-#define INJECT_F_DELAY_EXIT    0x10
-#define INJECT_F_SYSCALL       0x20
+# define INJECT_F_SIGNAL               0x01
+# define INJECT_F_ERROR                0x02
+# define INJECT_F_RETVAL               0x04
+# define INJECT_F_DELAY_ENTER  0x08
+# define INJECT_F_DELAY_EXIT   0x10
+# define INJECT_F_SYSCALL      0x20
 
-#define INJECT_ACTION_FLAGS    \
+# define INJECT_ACTION_FLAGS   \
        (INJECT_F_SIGNAL        \
        |INJECT_F_ERROR         \
        |INJECT_F_RETVAL        \
@@ -186,7 +186,7 @@ struct inject_opts {
        struct inject_data data;
 };
 
-#define MAX_ERRNO_VALUE                        4095
+# define MAX_ERRNO_VALUE                       4095
 
 /* Trace Control Block */
 struct tcb {
@@ -197,9 +197,9 @@ struct tcb {
        kernel_ulong_t scno;    /* System call number */
        kernel_ulong_t u_arg[MAX_ARGS]; /* System call arguments */
        kernel_long_t u_rval;   /* Return value */
-#if SUPPORTED_PERSONALITIES > 1
+# if SUPPORTED_PERSONALITIES > 1
        unsigned int currpers;  /* Personality at the time of scno update */
-#endif
+# endif
        int sys_func_rval;      /* Syscall entry parser's return value */
        int curcol;             /* Output column for this process */
        FILE *outf;             /* Output file for this process */
@@ -216,20 +216,20 @@ struct tcb {
 
        struct mmap_cache_t *mmap_cache;
 
-#ifdef HAVE_LINUX_KVM_H
+# ifdef HAVE_LINUX_KVM_H
        struct vcpu_info *vcpu_info_list;
-#endif
+# endif
 
-#ifdef ENABLE_STACKTRACE
+# ifdef ENABLE_STACKTRACE
        void *unwind_ctx;
        struct unwind_queue_t *unwind_queue;
-#endif
+# endif
 };
 
 /* TCB flags */
 /* We have attached to this process, but did not see it stopping yet */
-#define TCB_STARTUP            0x01
-#define TCB_IGNORE_ONE_SIGSTOP 0x02    /* Next SIGSTOP is to be ignored */
+# define TCB_STARTUP           0x01
+# define TCB_IGNORE_ONE_SIGSTOP        0x02    /* Next SIGSTOP is to be ignored */
 /*
  * Are we in system call entry or in syscall exit?
  *
@@ -241,51 +241,51 @@ struct tcb {
  * Use entering(tcp) / exiting(tcp) to check this bit to make code more
  * readable.
  */
-#define TCB_INSYSCALL  0x04
-#define TCB_ATTACHED   0x08    /* We attached to it already */
-#define TCB_REPRINT    0x10    /* We should reprint this syscall on exit */
-#define TCB_FILTERED   0x20    /* This system call has been filtered out */
-#define TCB_TAMPERED   0x40    /* A syscall has been tampered with */
-#define TCB_HIDE_LOG   0x80    /* We should hide everything (until execve) */
-#define TCB_CHECK_EXEC_SYSCALL 0x100   /* Check whether this execve syscall succeeded */
-#define TCB_SKIP_DETACH_ON_FIRST_EXEC  0x200   /* -b execve should skip detach on first execve */
-#define TCB_GRABBED    0x400   /* We grab the process and can catch it
+# define TCB_INSYSCALL 0x04
+# define TCB_ATTACHED  0x08    /* We attached to it already */
+# define TCB_REPRINT   0x10    /* We should reprint this syscall on exit */
+# define TCB_FILTERED  0x20    /* This system call has been filtered out */
+# define TCB_TAMPERED  0x40    /* A syscall has been tampered with */
+# define TCB_HIDE_LOG  0x80    /* We should hide everything (until execve) */
+# define TCB_CHECK_EXEC_SYSCALL        0x100   /* Check whether this execve syscall succeeded */
+# define TCB_SKIP_DETACH_ON_FIRST_EXEC 0x200   /* -b execve should skip detach on first execve */
+# define TCB_GRABBED   0x400   /* We grab the process and can catch it
                                 * in the middle of a syscall */
-#define TCB_RECOVERING 0x800   /* We try to recover after detecting incorrect
+# define TCB_RECOVERING        0x800   /* We try to recover after detecting incorrect
                                 * syscall entering/exiting state */
-#define TCB_INJECT_DELAY_EXIT  0x1000  /* Current syscall needs to be delayed
+# define TCB_INJECT_DELAY_EXIT 0x1000  /* Current syscall needs to be delayed
                                           on exit */
-#define TCB_DELAYED    0x2000  /* Current syscall has been delayed */
-#define TCB_TAMPERED_NO_FAIL 0x4000    /* We tamper tcb with syscall
+# define TCB_DELAYED   0x2000  /* Current syscall has been delayed */
+# define TCB_TAMPERED_NO_FAIL 0x4000   /* We tamper tcb with syscall
                                           that should not fail. */
 
 /* qualifier flags */
-#define QUAL_TRACE     0x001   /* this system call should be traced */
-#define QUAL_ABBREV    0x002   /* abbreviate the structures of this syscall */
-#define QUAL_VERBOSE   0x004   /* decode the structures of this syscall */
-#define QUAL_RAW       0x008   /* print all args in hex for this syscall */
-#define QUAL_INJECT    0x010   /* tamper with this system call on purpose */
-
-#define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE)
-
-#define entering(tcp)  (!((tcp)->flags & TCB_INSYSCALL))
-#define exiting(tcp)   ((tcp)->flags & TCB_INSYSCALL)
-#define syserror(tcp)  ((tcp)->u_error != 0)
-#define traced(tcp)    ((tcp)->qual_flg & QUAL_TRACE)
-#define verbose(tcp)   ((tcp)->qual_flg & QUAL_VERBOSE)
-#define abbrev(tcp)    ((tcp)->qual_flg & QUAL_ABBREV)
-#define raw(tcp)       ((tcp)->qual_flg & QUAL_RAW)
-#define inject(tcp)    ((tcp)->qual_flg & QUAL_INJECT)
-#define filtered(tcp)  ((tcp)->flags & TCB_FILTERED)
-#define hide_log(tcp)  ((tcp)->flags & TCB_HIDE_LOG)
-#define check_exec_syscall(tcp)        ((tcp)->flags & TCB_CHECK_EXEC_SYSCALL)
-#define syscall_tampered(tcp)  ((tcp)->flags & TCB_TAMPERED)
-#define recovering(tcp)        ((tcp)->flags & TCB_RECOVERING)
-#define inject_delay_exit(tcp) ((tcp)->flags & TCB_INJECT_DELAY_EXIT)
-#define syscall_delayed(tcp)   ((tcp)->flags & TCB_DELAYED)
-#define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL)
-
-#include "xlat.h"
+# define QUAL_TRACE    0x001   /* this system call should be traced */
+# define QUAL_ABBREV   0x002   /* abbreviate the structures of this syscall */
+# define QUAL_VERBOSE  0x004   /* decode the structures of this syscall */
+# define QUAL_RAW      0x008   /* print all args in hex for this syscall */
+# define QUAL_INJECT   0x010   /* tamper with this system call on purpose */
+
+# define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE)
+
+# define entering(tcp) (!((tcp)->flags & TCB_INSYSCALL))
+# define exiting(tcp)  ((tcp)->flags & TCB_INSYSCALL)
+# define syserror(tcp) ((tcp)->u_error != 0)
+# define traced(tcp)   ((tcp)->qual_flg & QUAL_TRACE)
+# define verbose(tcp)  ((tcp)->qual_flg & QUAL_VERBOSE)
+# define abbrev(tcp)   ((tcp)->qual_flg & QUAL_ABBREV)
+# define raw(tcp)      ((tcp)->qual_flg & QUAL_RAW)
+# define inject(tcp)   ((tcp)->qual_flg & QUAL_INJECT)
+# define filtered(tcp) ((tcp)->flags & TCB_FILTERED)
+# define hide_log(tcp) ((tcp)->flags & TCB_HIDE_LOG)
+# define check_exec_syscall(tcp)       ((tcp)->flags & TCB_CHECK_EXEC_SYSCALL)
+# define syscall_tampered(tcp) ((tcp)->flags & TCB_TAMPERED)
+# define recovering(tcp)       ((tcp)->flags & TCB_RECOVERING)
+# define inject_delay_exit(tcp)        ((tcp)->flags & TCB_INJECT_DELAY_EXIT)
+# define syscall_delayed(tcp)  ((tcp)->flags & TCB_DELAYED)
+# define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL)
+
+# include "xlat.h"
 
 extern const struct xlat addrfams[];
 
@@ -338,24 +338,24 @@ extern const struct xlat tcp_states[];
 extern const struct xlat whence_codes[];
 
 /* Format of syscall return values */
-#define RVAL_UDECIMAL  000     /* unsigned decimal format */
-#define RVAL_HEX       001     /* hex format */
-#define RVAL_OCTAL     002     /* octal format */
-#define RVAL_FD                010     /* file descriptor */
-#define RVAL_MASK      013     /* mask for these values */
+# define RVAL_UDECIMAL 000     /* unsigned decimal format */
+# define RVAL_HEX      001     /* hex format */
+# define RVAL_OCTAL    002     /* octal format */
+# define RVAL_FD               010     /* file descriptor */
+# define RVAL_MASK     013     /* mask for these values */
 
-#define RVAL_STR       020     /* Print `auxstr' field after return val */
-#define RVAL_NONE      040     /* Print nothing */
+# define RVAL_STR      020     /* Print `auxstr' field after return val */
+# define RVAL_NONE     040     /* Print nothing */
 
-#define RVAL_DECODED   0100    /* syscall decoding finished */
-#define RVAL_IOCTL_DECODED 0200        /* ioctl sub-parser successfully decoded
+# define RVAL_DECODED  0100    /* syscall decoding finished */
+# define RVAL_IOCTL_DECODED 0200       /* ioctl sub-parser successfully decoded
                                   the argument */
 
-#define IOCTL_NUMBER_UNKNOWN 0
-#define IOCTL_NUMBER_HANDLED 1
-#define IOCTL_NUMBER_STOP_LOOKUP 010
+# define IOCTL_NUMBER_UNKNOWN 0
+# define IOCTL_NUMBER_HANDLED 1
+# define IOCTL_NUMBER_STOP_LOOKUP 010
 
-#define indirect_ipccall(tcp) (tcp->s_ent->sys_flags & TRACE_INDIRECT_SUBCALL)
+# define indirect_ipccall(tcp) (tcp->s_ent->sys_flags & TRACE_INDIRECT_SUBCALL)
 
 enum sock_proto {
        SOCK_PROTO_UNKNOWN,
@@ -405,18 +405,18 @@ extern struct path_set {
        size_t num_selected;
        size_t size;
 } global_path_set;
-#define tracing_paths (global_path_set.num_selected != 0)
+# define tracing_paths (global_path_set.num_selected != 0)
 extern unsigned xflag;
 extern unsigned followfork;
-#ifdef ENABLE_STACKTRACE
+# ifdef ENABLE_STACKTRACE
 /* if this is true do the stack trace for every system call */
 extern bool stack_trace_enabled;
-#endif
+# endif
 extern unsigned ptrace_setoptions;
 extern unsigned max_strlen;
 extern unsigned os_release;
-#undef KERNEL_VERSION
-#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
+# undef KERNEL_VERSION
+# define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
 
 extern int read_int_from_file(struct tcb *, const char *, int *);
 
@@ -495,7 +495,7 @@ static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val)
  */
 extern int
 umoven(struct tcb *, kernel_ulong_t addr, unsigned int len, void *laddr);
-#define umove(pid, addr, objp) \
+# define umove(pid, addr, objp)        \
        umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 /**
@@ -510,7 +510,7 @@ tfetch_mem(struct tcb *tcp, const kernel_ulong_t addr,
 {
        return tfetch_mem64(tcp, addr, len, laddr);
 }
-#define tfetch_obj(pid, addr, objp)    \
+# define tfetch_obj(pid, addr, objp)   \
        tfetch_mem((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 /**
@@ -533,7 +533,7 @@ tfetch_mem_ignore_syserror(struct tcb *tcp, const kernel_ulong_t addr,
 extern int
 umoven_or_printaddr64(struct tcb *, uint64_t addr,
                      unsigned int len, void *laddr);
-#define umove_or_printaddr64(pid, addr, objp)  \
+# define umove_or_printaddr64(pid, addr, objp) \
        umoven_or_printaddr64((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 static inline int
@@ -542,7 +542,7 @@ umoven_or_printaddr(struct tcb *tcp, const kernel_ulong_t addr,
 {
        return umoven_or_printaddr64(tcp, addr, len, laddr);
 }
-#define umove_or_printaddr(pid, addr, objp)    \
+# define umove_or_printaddr(pid, addr, objp)   \
        umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 /**
@@ -551,7 +551,7 @@ umoven_or_printaddr(struct tcb *tcp, const kernel_ulong_t addr,
 extern int
 umoven_or_printaddr64_ignore_syserror(struct tcb *, uint64_t addr,
                                      unsigned int len, void *laddr);
-#define umove_or_printaddr64_ignore_syserror(pid, addr, objp)  \
+# define umove_or_printaddr64_ignore_syserror(pid, addr, objp) \
        umoven_or_printaddr64_ignore_syserror((pid), (addr), sizeof(*(objp)), \
                                              (void *) (objp))
 
@@ -561,7 +561,7 @@ umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const kernel_ulong_t addr,
 {
        return umoven_or_printaddr64_ignore_syserror(tcp, addr, len, laddr);
 }
-#define umove_or_printaddr_ignore_syserror(pid, addr, objp)    \
+# define umove_or_printaddr_ignore_syserror(pid, addr, objp)   \
        umoven_or_printaddr_ignore_syserror((pid), (addr), sizeof(*(objp)), \
                                            (void *) (objp))
 
@@ -574,9 +574,9 @@ umovestr(struct tcb *, kernel_ulong_t addr, unsigned int len, char *laddr);
 extern int upeek(struct tcb *tcp, unsigned long, kernel_ulong_t *);
 extern int upoke(struct tcb *tcp, unsigned long, kernel_ulong_t);
 
-#if HAVE_ARCH_GETRVAL2
+# if HAVE_ARCH_GETRVAL2
 extern long getrval2(struct tcb *);
-#endif
+# endif
 
 extern const char *signame(const int);
 extern const char *sprintsigname(const int);
@@ -625,14 +625,14 @@ str_strip_prefix_len(const char *str, const char *prefix, size_t prefix_len)
        return strncmp(str, prefix, prefix_len) ? str : str + prefix_len;
 }
 
-#define STR_STRIP_PREFIX(str, prefix)  \
+# define STR_STRIP_PREFIX(str, prefix) \
        str_strip_prefix_len((str), (prefix), sizeof(prefix) - 1)
 
-#define QUOTE_0_TERMINATED                     0x01
-#define QUOTE_OMIT_LEADING_TRAILING_QUOTES     0x02
-#define QUOTE_OMIT_TRAILING_0                  0x08
-#define QUOTE_FORCE_HEX                                0x10
-#define QUOTE_EMIT_COMMENT                     0x20
+# define QUOTE_0_TERMINATED                    0x01
+# define QUOTE_OMIT_LEADING_TRAILING_QUOTES    0x02
+# define QUOTE_OMIT_TRAILING_0                 0x08
+# define QUOTE_FORCE_HEX                               0x10
+# define QUOTE_EMIT_COMMENT                    0x20
 
 extern int string_quote(const char *, char *, unsigned int, unsigned int,
                        const char *escape_chars);
@@ -644,13 +644,13 @@ extern int print_quoted_cstring(const char *, unsigned int);
 /* a refers to the lower numbered u_arg,
  * b refers to the higher numbered u_arg
  */
-#ifdef WORDS_BIGENDIAN
-# define ULONG_LONG(a, b) \
+# ifdef WORDS_BIGENDIAN
+#  define ULONG_LONG(a, b) \
        ((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))
-#else
-# define ULONG_LONG(a, b) \
+# else
+#  define ULONG_LONG(a, b) \
        ((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))
-#endif
+# endif
 extern int getllval(struct tcb *, unsigned long long *, int);
 extern int printllval(struct tcb *, const char *, int)
        ATTRIBUTE_FORMAT((printf, 2, 0));
@@ -663,15 +663,15 @@ printaddr(const kernel_ulong_t addr)
        printaddr64(addr);
 }
 
-#define xlat_verbose(style_) ((style_) & XLAT_STYLE_VERBOSITY_MASK)
-#define xlat_format(style_)  ((style_) & XLAT_STYLE_FORMAT_MASK)
+# define xlat_verbose(style_) ((style_) & XLAT_STYLE_VERBOSITY_MASK)
+# define xlat_format(style_)  ((style_) & XLAT_STYLE_FORMAT_MASK)
 
 extern enum xlat_style xlat_verbosity;
 
 extern int printxvals_ex(uint64_t val, const char *dflt,
                         enum xlat_style, const struct xlat *, ...)
        ATTRIBUTE_SENTINEL;
-#define printxvals(val_, dflt_, ...) \
+# define printxvals(val_, dflt_, ...) \
        printxvals_ex((val_), (dflt_), XLAT_STYLE_DEFAULT, __VA_ARGS__)
 
 extern int printxval_searchn_ex(const struct xlat *, size_t xlat_size,
@@ -691,9 +691,9 @@ printxval_searchn(const struct xlat *xlat, size_t xlat_size, uint64_t val,
  * as the array size, as all arrays are XLAT_END-terminated and
  * printxval_searchn expects a size without the terminating record.
  */
-#define printxval_search(xlat__, val__, dflt__) \
+# define printxval_search(xlat__, val__, dflt__) \
        printxval_searchn(xlat__, ARRAY_SIZE(xlat__) - 1, val__, dflt__)
-#define printxval_search_ex(xlat__, val__, dflt__, style__) \
+# define printxval_search_ex(xlat__, val__, dflt__, style__) \
        printxval_searchn_ex((xlat__), ARRAY_SIZE(xlat__) - 1, (val__), \
                             (dflt__), (style__))
 
@@ -708,9 +708,9 @@ printxval_indexn(const struct xlat *xlat, size_t xlat_size, uint64_t val,
                                   XLAT_STYLE_DEFAULT);
 }
 
-#define printxval_index(xlat__, val__, dflt__) \
+# define printxval_index(xlat__, val__, dflt__) \
        printxval_indexn(xlat__, ARRAY_SIZE(xlat__) - 1, val__, dflt__)
-#define printxval_index_ex(xlat__, val__, dflt__) \
+# define printxval_index_ex(xlat__, val__, dflt__) \
        printxval_indexn_ex((xlat__), ARRAY_SIZE(xlat__) - 1, (val__), \
                            (dflt__), XLAT_STYLE_DEFAULT)
 
@@ -745,7 +745,7 @@ enum xlat_style_private_flag_bits {
        PXF_DEFAULT_STR_BIT,
 };
 
-#define FLAG_(name_) name_ = 1 << name_##_BIT
+# define FLAG_(name_) name_ = 1 << name_##_BIT
 
 enum xlat_style_private_flags {
        /* print_array */
@@ -757,17 +757,17 @@ enum xlat_style_private_flags {
        FLAG_(PXF_DEFAULT_STR),
 };
 
-#undef FLAG_
+# undef FLAG_
 
 /** Print a value in accordance with xlat formatting settings. */
 extern void print_xlat_ex(uint64_t val, const char *str, enum xlat_style style);
-#define print_xlat(val_) \
+# define print_xlat(val_) \
        print_xlat_ex((val_), #val_, XLAT_STYLE_DEFAULT)
-#define print_xlat32(val_) \
+# define print_xlat32(val_) \
        print_xlat_ex((uint32_t) (val_), #val_, XLAT_STYLE_DEFAULT)
-#define print_xlat_u(val_) \
+# define print_xlat_u(val_) \
        print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_U)
-#define print_xlat_d(val_) \
+# define print_xlat_d(val_) \
        print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_D)
 
 extern int printargs(struct tcb *);
@@ -870,7 +870,7 @@ printpathn(struct tcb *, kernel_ulong_t addr, unsigned int n);
 extern int
 printpath(struct tcb *, kernel_ulong_t addr);
 
-#define TIMESPEC_TEXT_BUFSIZE \
+# define TIMESPEC_TEXT_BUFSIZE \
                (sizeof(long long) * 3 * 2 + sizeof("{tv_sec=-, tv_nsec=}"))
 extern void printfd(struct tcb *, int);
 extern void print_sockaddr(const void *sa, int len);
@@ -896,7 +896,7 @@ extern void
 print_sigset_addr(struct tcb *, kernel_ulong_t addr);
 
 extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
-#define tprintsigmask_addr(prefix, mask) \
+# define tprintsigmask_addr(prefix, mask) \
        tprints(sprintsigmask_n((prefix), (mask), sizeof(mask)))
 extern void printsignal(int);
 
@@ -947,7 +947,7 @@ extern void print_bpf_filter_code(const uint16_t code, bool extended);
 extern void qualify(const char *);
 extern unsigned int qual_flags(const unsigned int);
 
-#define DECL_IOCTL(name)                                               \
+# define DECL_IOCTL(name)                                              \
 extern int                                                             \
 name ## _ioctl(struct tcb *, unsigned int request, kernel_ulong_t arg) \
 /* End of DECL_IOCTL definition. */
@@ -966,7 +966,7 @@ DECL_IOCTL(scsi);
 DECL_IOCTL(term);
 DECL_IOCTL(ubi);
 DECL_IOCTL(uffdio);
-#undef DECL_IOCTL
+# undef DECL_IOCTL
 
 extern int decode_sg_io_v4(struct tcb *, const kernel_ulong_t arg);
 extern void print_evdev_ff_type(const kernel_ulong_t val);
@@ -976,7 +976,7 @@ struct nlmsghdr;
 typedef bool (*netlink_decoder_t)(struct tcb *, const struct nlmsghdr *,
                                  kernel_ulong_t addr, unsigned int len);
 
-#define DECL_NETLINK(name)                                             \
+# define DECL_NETLINK(name)                                            \
 extern bool                                                            \
 decode_netlink_ ## name(struct tcb *, const struct nlmsghdr *,         \
                        kernel_ulong_t addr, unsigned int len)          \
@@ -1000,18 +1000,18 @@ extern void ts_sub(struct timespec *, const struct timespec *, const struct time
 extern void ts_mul(struct timespec *, const struct timespec *, int);
 extern void ts_div(struct timespec *, const struct timespec *, int);
 
-#ifdef ENABLE_STACKTRACE
+# ifdef ENABLE_STACKTRACE
 extern void unwind_init(void);
 extern void unwind_tcb_init(struct tcb *);
 extern void unwind_tcb_fin(struct tcb *);
 extern void unwind_tcb_print(struct tcb *);
 extern void unwind_tcb_capture(struct tcb *);
-#endif
+# endif
 
-#ifdef HAVE_LINUX_KVM_H
+# ifdef HAVE_LINUX_KVM_H
 extern void kvm_run_structure_decoder_init(void);
 extern void kvm_vcpu_info_free(struct tcb *);
-#endif
+# endif
 
 static inline int
 printstrn(struct tcb *tcp, kernel_ulong_t addr, kernel_ulong_t len)
@@ -1080,7 +1080,7 @@ tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
        tprint_iov_upto(tcp, len, addr, decode_iov, -1);
 }
 
-#ifdef ALPHA
+# ifdef ALPHA
 typedef struct {
        int tv_sec, tv_usec;
 } timeval32_t;
@@ -1091,9 +1091,9 @@ extern const char *sprint_timeval32(struct tcb *, kernel_ulong_t addr);
 extern void print_timeval32(struct tcb *, kernel_ulong_t addr);
 extern void print_timeval32_utimes(struct tcb *, kernel_ulong_t addr);
 extern void print_itimerval32(struct tcb *, kernel_ulong_t addr);
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_USER_DESC
+# ifdef HAVE_STRUCT_USER_DESC
 /**
  * Filter what to print from the point of view of the get_thread_area syscall.
  * Kernel copies only entry_number field at first and then tries to write the
@@ -1109,7 +1109,7 @@ enum user_desc_print_filter {
 
 extern void print_user_desc(struct tcb *, kernel_ulong_t addr,
                            enum user_desc_print_filter filter);
-#endif
+# endif
 
 /* Strace log generation machinery.
  *
@@ -1150,32 +1150,32 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size)
        tprints(sprint_mac_addr(addr, size));
 }
 
-#if SUPPORTED_PERSONALITIES > 1
+# if SUPPORTED_PERSONALITIES > 1
 extern void set_personality(unsigned int personality);
 extern unsigned current_personality;
-#else
-# define set_personality(personality) ((void)0)
-# define current_personality 0
-#endif
-
-#if SUPPORTED_PERSONALITIES == 1
-# define current_wordsize PERSONALITY0_WORDSIZE
-# define current_klongsize PERSONALITY0_KLONGSIZE
-#else
-# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE
-#  define current_wordsize PERSONALITY0_WORDSIZE
 # else
-extern unsigned current_wordsize;
+#  define set_personality(personality) ((void)0)
+#  define current_personality 0
 # endif
-# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == PERSONALITY1_KLONGSIZE
+
+# if SUPPORTED_PERSONALITIES == 1
+#  define current_wordsize PERSONALITY0_WORDSIZE
 #  define current_klongsize PERSONALITY0_KLONGSIZE
 # else
+#  if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE
+#   define current_wordsize PERSONALITY0_WORDSIZE
+#  else
+extern unsigned current_wordsize;
+#  endif
+#  if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == PERSONALITY1_KLONGSIZE
+#   define current_klongsize PERSONALITY0_KLONGSIZE
+#  else
 extern unsigned current_klongsize;
+#  endif
 # endif
-#endif
 
-#define max_addr() (~0ULL >> ((8 - current_wordsize) * 8))
-#define max_kaddr() (~0ULL >> ((8 - current_klongsize) * 8))
+# define max_addr() (~0ULL >> ((8 - current_wordsize) * 8))
+# define max_kaddr() (~0ULL >> ((8 - current_klongsize) * 8))
 
 /*
  * When u64 is interpreted by the kernel as an address, there is a difference
@@ -1184,7 +1184,7 @@ extern unsigned current_klongsize;
  * to a valid address).  Since 32-bit strace cannot figure out what kind of
  * kernel the tracee is running on, it has to account for both possibilities.
  */
-#if CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL
+# if CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL
 
 /**
  * Print raw 64-bit value as an address if it's too big to fit in strace's
@@ -1198,18 +1198,18 @@ print_big_u64_addr(const uint64_t addr)
                tprints(" or ");
        }
 }
-#else /* !CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL */
-# define print_big_u64_addr(addr_) ((void) 0)
-#endif /* CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL */
+# else /* !CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL */
+#  define print_big_u64_addr(addr_) ((void) 0)
+# endif /* CAN_ARCH_BE_COMPAT_ON_64BIT_KERNEL */
 
-#if SIZEOF_KERNEL_LONG_T > 4           \
+# if SIZEOF_KERNEL_LONG_T > 4          \
  && (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize))
-# define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG    1
-#else
-# define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG    0
-#endif
+#  define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG   1
+# else
+#  define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG   0
+# endif
 
-#define DECL_PRINTNUM(name)                                            \
+# define DECL_PRINTNUM(name)                                           \
 extern bool                                                            \
 printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt)  \
        ATTRIBUTE_FORMAT((printf, 3, 0))                                \
@@ -1218,18 +1218,18 @@ printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt)   \
 DECL_PRINTNUM(short);
 DECL_PRINTNUM(int);
 DECL_PRINTNUM(int64);
-#undef DECL_PRINTNUM
+# undef DECL_PRINTNUM
 
-#define DECL_PRINTNUM_ADDR(name)                                       \
+# define DECL_PRINTNUM_ADDR(name)                                      \
 extern bool                                                            \
 printnum_addr_ ## name(struct tcb *, kernel_ulong_t addr)              \
 /* End of DECL_PRINTNUM_ADDR definition. */
 
 DECL_PRINTNUM_ADDR(int);
 DECL_PRINTNUM_ADDR(int64);
-#undef DECL_PRINTNUM_ADDR
+# undef DECL_PRINTNUM_ADDR
 
-#ifndef current_wordsize
+# ifndef current_wordsize
 extern bool
 printnum_long_int(struct tcb *, kernel_ulong_t addr,
                  const char *fmt_long, const char *fmt_int)
@@ -1256,7 +1256,7 @@ printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_long_int(tcp, addr);
 }
 
-#elif current_wordsize > 4
+# elif current_wordsize > 4
 
 static inline bool
 printnum_slong(struct tcb *tcp, kernel_ulong_t addr)
@@ -1276,7 +1276,7 @@ printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_int64(tcp, addr);
 }
 
-#else /* current_wordsize == 4 */
+# else /* current_wordsize == 4 */
 
 static inline bool
 printnum_slong(struct tcb *tcp, kernel_ulong_t addr)
@@ -1296,9 +1296,9 @@ printnum_ptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_int(tcp, addr);
 }
 
-#endif
+# endif
 
-#ifndef current_klongsize
+# ifndef current_klongsize
 extern bool printnum_addr_klong_int(struct tcb *, kernel_ulong_t addr);
 
 static inline bool
@@ -1307,7 +1307,7 @@ printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_klong_int(tcp, addr);
 }
 
-#elif current_klongsize > 4
+# elif current_klongsize > 4
 
 static inline bool
 printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
@@ -1315,7 +1315,7 @@ printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_int64(tcp, addr);
 }
 
-#else /* current_klongsize == 4 */
+# else /* current_klongsize == 4 */
 
 static inline bool
 printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
@@ -1323,9 +1323,9 @@ printnum_kptr(struct tcb *tcp, kernel_ulong_t addr)
        return printnum_addr_int(tcp, addr);
 }
 
-#endif
+# endif
 
-#define DECL_PRINTPAIR(name)                                           \
+# define DECL_PRINTPAIR(name)                                          \
 extern bool                                                            \
 printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
        ATTRIBUTE_FORMAT((printf, 3, 0))                                \
@@ -1333,16 +1333,16 @@ printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt)  \
 
 DECL_PRINTPAIR(int);
 DECL_PRINTPAIR(int64);
-#undef DECL_PRINTPAIR
+# undef DECL_PRINTPAIR
 
 static inline kernel_long_t
 truncate_klong_to_current_wordsize(const kernel_long_t v)
 {
-#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
+# if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
        if (current_wordsize < sizeof(v)) {
                return (int) v;
        } else
-#endif
+# endif
        {
                return v;
        }
@@ -1351,11 +1351,11 @@ truncate_klong_to_current_wordsize(const kernel_long_t v)
 static inline kernel_ulong_t
 truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
 {
-#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
+# if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
        if (current_wordsize < sizeof(v)) {
                return (unsigned int) v;
        } else
-#endif
+# endif
        {
                return v;
        }
@@ -1364,12 +1364,12 @@ truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
 /*
  * Cast a pointer or a pointer-sized integer to kernel_ulong_t.
  */
-#define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v))
+# define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v))
 
 /*
  * Zero-extend a signed integer type to unsigned long long.
  */
-#define zero_extend_signed_to_ull(v) \
+# define zero_extend_signed_to_ull(v) \
        (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \
         sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \
         sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \
@@ -1379,7 +1379,7 @@ truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
 /*
  * Sign-extend an unsigned integer type to long long.
  */
-#define sign_extend_unsigned_to_ll(v) \
+# define sign_extend_unsigned_to_ll(v) \
        (sizeof(v) == sizeof(char) ? (long long) (char) (v) : \
         sizeof(v) == sizeof(short) ? (long long) (short) (v) : \
         sizeof(v) == sizeof(int) ? (long long) (int) (v) : \
@@ -1398,13 +1398,13 @@ extern const char *const personality_names[];
 /* Personality designators to be used for specifying personality */
 extern const char *const personality_designators[];
 
-#if SUPPORTED_PERSONALITIES > 1
+# if SUPPORTED_PERSONALITIES > 1
 extern const struct_sysent *sysent;
 extern const struct_ioctlent *ioctlent;
-#else
-# define sysent     sysent0
-# define ioctlent   ioctlent0
-#endif
+# else
+#  define sysent     sysent0
+#  define ioctlent   ioctlent0
+# endif
 
 extern unsigned nsyscalls;
 extern unsigned nioctlents;
@@ -1413,17 +1413,17 @@ extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES];
 extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES];
 extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
 
-#ifdef IN_MPERS_BOOTSTRAP
+# ifdef IN_MPERS_BOOTSTRAP
 /* Transform multi-line MPERS_PRINTER_DECL statements to one-liners.  */
-# define MPERS_PRINTER_DECL(type, name, ...) MPERS_PRINTER_DECL(type, name, __VA_ARGS__)
-#else /* !IN_MPERS_BOOTSTRAP */
-# if SUPPORTED_PERSONALITIES > 1
-#  include "printers.h"
-# else
-#  include "native_printer_decls.h"
-# endif
-# define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__)
-#endif /* !IN_MPERS_BOOTSTRAP */
+#  define MPERS_PRINTER_DECL(type, name, ...) MPERS_PRINTER_DECL(type, name, __VA_ARGS__)
+# else /* !IN_MPERS_BOOTSTRAP */
+#  if SUPPORTED_PERSONALITIES > 1
+#   include "printers.h"
+#  else
+#   include "native_printer_decls.h"
+#  endif
+#  define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__)
+# endif /* !IN_MPERS_BOOTSTRAP */
 
 /* Checks that sysent[scno] is not out of range. */
 static inline bool
@@ -1445,12 +1445,12 @@ scno_is_valid(kernel_ulong_t scno)
               && !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
 }
 
-#define MPERS_FUNC_NAME__(prefix, name) prefix ## name
-#define MPERS_FUNC_NAME_(prefix, name) MPERS_FUNC_NAME__(prefix, name)
-#define MPERS_FUNC_NAME(name) MPERS_FUNC_NAME_(MPERS_PREFIX, name)
+# define MPERS_FUNC_NAME__(prefix, name) prefix ## name
+# define MPERS_FUNC_NAME_(prefix, name) MPERS_FUNC_NAME__(prefix, name)
+# define MPERS_FUNC_NAME(name) MPERS_FUNC_NAME_(MPERS_PREFIX, name)
 
-#define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name)
+# define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name)
 
-#define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp)
+# define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp)
 
 #endif /* !STRACE_DEFS_H */
diff --git a/delay.h b/delay.h
index 278645a292e56fff86c549a6656b8109f96bebd2..fa111c76024fabd01191a42f5c3ebfd5ae8bbeed 100644 (file)
--- a/delay.h
+++ b/delay.h
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_DELAY_H
-#define STRACE_DELAY_H
+# define STRACE_DELAY_H
 
 uint16_t alloc_delay_data(void);
 void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
diff --git a/dm.c b/dm.c
index 6124e2aea24798ae47650833cb2ba4ed4b0a3bf2..dbeca3352eba1388c226a3075dd8f675636ba050 100644 (file)
--- a/dm.c
+++ b/dm.c
@@ -98,7 +98,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
        }
 }
 
-#include "xlat/dm_flags.h"
+#  include "xlat/dm_flags.h"
 
 static void
 dm_decode_flags(const struct dm_ioctl *ioc)
index 2c43ce7ead6e7b2fd880f7bc671172249c59c2ed..678c1d15ab34af110f5c4514108abc04f281fd4d 100644 (file)
  */
 
 #ifndef STRACE_ERROR_PRINTS_H
-#define STRACE_ERROR_PRINTS_H
+# define STRACE_ERROR_PRINTS_H
 
-#include <stdbool.h>
+# include <stdbool.h>
 
-#include "gcc_compat.h"
+# include "gcc_compat.h"
 
 extern bool debug_flag;
 
@@ -31,29 +31,29 @@ void error_msg_and_die(const char *fmt, ...)
        ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
 
 /* Wrappers for if (debug_flag) error_msg(...) */
-#define debug_msg(...) \
+# define debug_msg(...) \
        do { \
                if (debug_flag) \
                        error_msg(__VA_ARGS__); \
        } while (0)
-#define debug_perror_msg(...) \
+# define debug_perror_msg(...) \
        do { \
                if (debug_flag) \
                        perror_msg(__VA_ARGS__); \
        } while (0)
 
 /* Simple wrappers for providing function name in error messages */
-#define error_func_msg(fmt_, ...) \
+# define error_func_msg(fmt_, ...) \
        error_msg("%s: " fmt_,  __func__, ##__VA_ARGS__)
-#define perror_func_msg(fmt_, ...) \
+# define perror_func_msg(fmt_, ...) \
        perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
-#define debug_func_msg(fmt_, ...) \
+# define debug_func_msg(fmt_, ...) \
        debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
-#define debug_func_perror_msg(fmt_, ...) \
+# define debug_func_perror_msg(fmt_, ...) \
        debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
-#define error_func_msg_and_die(fmt_, ...) \
+# define error_func_msg_and_die(fmt_, ...) \
        error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
-#define perror_func_msg_and_die(fmt_, ...) \
+# define perror_func_msg_and_die(fmt_, ...) \
        perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
 
 #endif /* !STRACE_ERROR_PRINTS_H */
diff --git a/evdev.c b/evdev.c
index 8d22d08ea42310e554f95e49ebd1d08e1f481145..e402d26e2b3ea84c56ec637109a85c1f88566c82 100644 (file)
--- a/evdev.c
+++ b/evdev.c
@@ -186,7 +186,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
        return RVAL_IOCTL_DECODED;
 }
 
-#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
+# define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
        decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
                       (dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
 
index 3e294ae046ad1e28fcf6857fd1e58b2648725c5d..ff99544bac217d3e4da1bdb6dc7a03ed890639c5 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifdef HAVE_LINUX_INPUT_H
 
-#include DEF_MPERS_TYPE(struct_ff_effect)
+# include DEF_MPERS_TYPE(struct_ff_effect)
 
 # include <linux/ioctl.h>
 # include <linux/input.h>
index 08cbb2aa52ac14ffe59d07f08f2b1759d6d2c4fc..1499bc07c2b231fe64f411ad9245f71846039a26 100644 (file)
@@ -6,16 +6,16 @@
  */
 
 #ifndef STRACE_F_OWNER_EX_H
-#define STRACE_F_OWNER_EX_H
+# define STRACE_F_OWNER_EX_H
 
-#include <linux/fcntl.h>
+# include <linux/fcntl.h>
 
-#if defined HAVE_STRUCT_F_OWNER_EX
+# if defined HAVE_STRUCT_F_OWNER_EX
 typedef struct f_owner_ex struct_kernel_f_owner_ex;
-#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
+# elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
 typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
-#else
-# error struct f_owner_ex definition not found in <linux/fcntl.h>
-#endif
+# else
+#  error struct f_owner_ex definition not found in <linux/fcntl.h>
+# endif
 
 #endif /* !STRACE_F_OWNER_EX_H */
index 0c81f7f6c7d6e0649ecf04af5caeda04ef194dd1..54b0a72bf8c3fd3d397fdcd976e54f97df0da0e5 100644 (file)
--- a/filter.h
+++ b/filter.h
@@ -7,7 +7,7 @@
  */
 
 #ifndef STRACE_FILTER_H
-#define STRACE_FILTER_H
+# define STRACE_FILTER_H
 
 struct number_set;
 typedef int (*string_to_uint_func)(const char *);
diff --git a/flock.h b/flock.h
index f4a6d4e9ff6f51411f7a3244c9b5b2a8c596a7c0..c7c13519a9d0e64b7018c2f2030fa508c54938a3 100644 (file)
--- a/flock.h
+++ b/flock.h
@@ -7,24 +7,24 @@
  */
 
 #ifndef STRACE_FLOCK_H
-#define STRACE_FLOCK_H
+# define STRACE_FLOCK_H
 
-#include <linux/fcntl.h>
+# include <linux/fcntl.h>
 
-#if defined HAVE_STRUCT_FLOCK
+# if defined HAVE_STRUCT_FLOCK
 typedef struct flock struct_kernel_flock;
-#elif defined HAVE_STRUCT___KERNEL_FLOCK
+# elif defined HAVE_STRUCT___KERNEL_FLOCK
 typedef struct __kernel_flock struct_kernel_flock;
-#else
-# error struct flock definition not found in <linux/fcntl.h>
-#endif
+# else
+#  error struct flock definition not found in <linux/fcntl.h>
+# endif
 
-#if defined HAVE_STRUCT_FLOCK64
+# if defined HAVE_STRUCT_FLOCK64
 typedef struct flock64 struct_kernel_flock64;
-#elif defined HAVE_STRUCT___KERNEL_FLOCK64
+# elif defined HAVE_STRUCT___KERNEL_FLOCK64
 typedef struct __kernel_flock64 struct_kernel_flock64;
-#else
-# error struct flock64 definition not found in <linux/fcntl.h>
-#endif
+# else
+#  error struct flock64 definition not found in <linux/fcntl.h>
+# endif
 
 #endif /* !STRACE_FLOCK_H */
index 9343febe560ce3635d855be7babc410b87d7f0dc..2d5d7f9eeb2caafcf1b90ad6e542029d951d8ec9 100644 (file)
  */
 
 #ifndef STRACE_GCC_COMPAT_H
-#define STRACE_GCC_COMPAT_H
+# define STRACE_GCC_COMPAT_H
 
-#if defined __GNUC__ && defined __GNUC_MINOR__
-# define GNUC_PREREQ(maj, min) \
+# if defined __GNUC__ && defined __GNUC_MINOR__
+#  define GNUC_PREREQ(maj, min)        \
        ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-#else
-# define GNUC_PREREQ(maj, min) 0
-#endif
+# else
+#  define GNUC_PREREQ(maj, min)        0
+# endif
 
-#if defined __clang__ && defined __clang_major__ && defined __clang_minor__
-# define CLANG_PREREQ(maj, min)        \
+# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
+#  define CLANG_PREREQ(maj, min)       \
        ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
-#else
-# define CLANG_PREREQ(maj, min)        0
-#endif
-
-#if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
-# define __attribute__(x)      /* empty */
-#endif
-
-#if GNUC_PREREQ(2, 5)
-# define ATTRIBUTE_NORETURN    __attribute__((__noreturn__))
-#else
-# define ATTRIBUTE_NORETURN    /* empty */
-#endif
-
-#if GNUC_PREREQ(2, 7)
-# define ATTRIBUTE_FORMAT(args)        __attribute__((__format__ args))
-# define ATTRIBUTE_ALIGNED(arg)        __attribute__((__aligned__(arg)))
-# define ATTRIBUTE_PACKED      __attribute__((__packed__))
-#else
-# define ATTRIBUTE_FORMAT(args)        /* empty */
-# define ATTRIBUTE_ALIGNED(arg)        /* empty */
-# define ATTRIBUTE_PACKED      /* empty */
-#endif
-
-#if GNUC_PREREQ(3, 0)
-# define SAME_TYPE(x, y)       __builtin_types_compatible_p(typeof(x), typeof(y))
-# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
+# else
+#  define CLANG_PREREQ(maj, min)       0
+# endif
+
+# if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
+#  define __attribute__(x)     /* empty */
+# endif
+
+# if GNUC_PREREQ(2, 5)
+#  define ATTRIBUTE_NORETURN   __attribute__((__noreturn__))
+# else
+#  define ATTRIBUTE_NORETURN   /* empty */
+# endif
+
+# if GNUC_PREREQ(2, 7)
+#  define ATTRIBUTE_FORMAT(args)       __attribute__((__format__ args))
+#  define ATTRIBUTE_ALIGNED(arg)       __attribute__((__aligned__(arg)))
+#  define ATTRIBUTE_PACKED     __attribute__((__packed__))
+# else
+#  define ATTRIBUTE_FORMAT(args)       /* empty */
+#  define ATTRIBUTE_ALIGNED(arg)       /* empty */
+#  define ATTRIBUTE_PACKED     /* empty */
+# endif
+
+# if GNUC_PREREQ(3, 0)
+#  define SAME_TYPE(x, y)      __builtin_types_compatible_p(typeof(x), typeof(y))
+#  define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
 /* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
-# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
-#else
-# define SAME_TYPE(x, y)       0
-# define MUST_BE_ARRAY(a)      0
-#endif
-
-#if GNUC_PREREQ(3, 0)
-# define ATTRIBUTE_MALLOC      __attribute__((__malloc__))
-#else
-# define ATTRIBUTE_MALLOC      /* empty */
-#endif
-
-#if GNUC_PREREQ(3, 1)
-# define ATTRIBUTE_NOINLINE    __attribute__((__noinline__))
-#else
-# define ATTRIBUTE_NOINLINE    /* empty */
-#endif
-
-#if GNUC_PREREQ(4, 0)
-# define ATTRIBUTE_SENTINEL    __attribute__((__sentinel__))
-#else
-# define ATTRIBUTE_SENTINEL    /* empty */
-#endif
-
-#if GNUC_PREREQ(4, 1)
-# define ALIGNOF(t_)   __alignof__(t_)
-#else
-# define ALIGNOF(t_)   (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
-#endif
-
-#if GNUC_PREREQ(4, 3)
-# define ATTRIBUTE_ALLOC_SIZE(args)    __attribute__((__alloc_size__ args))
-#else
-# define ATTRIBUTE_ALLOC_SIZE(args)    /* empty */
-#endif
-
-#if GNUC_PREREQ(7, 0)
-# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
-#else
-# define ATTRIBUTE_FALLTHROUGH ((void) 0)
-#endif
-
-#if CLANG_PREREQ(2, 8)
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT                                        \
+#  define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
+# else
+#  define SAME_TYPE(x, y)      0
+#  define MUST_BE_ARRAY(a)     0
+# endif
+
+# if GNUC_PREREQ(3, 0)
+#  define ATTRIBUTE_MALLOC     __attribute__((__malloc__))
+# else
+#  define ATTRIBUTE_MALLOC     /* empty */
+# endif
+
+# if GNUC_PREREQ(3, 1)
+#  define ATTRIBUTE_NOINLINE   __attribute__((__noinline__))
+# else
+#  define ATTRIBUTE_NOINLINE   /* empty */
+# endif
+
+# if GNUC_PREREQ(4, 0)
+#  define ATTRIBUTE_SENTINEL   __attribute__((__sentinel__))
+# else
+#  define ATTRIBUTE_SENTINEL   /* empty */
+# endif
+
+# if GNUC_PREREQ(4, 1)
+#  define ALIGNOF(t_)  __alignof__(t_)
+# else
+#  define ALIGNOF(t_)  (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
+# endif
+
+# if GNUC_PREREQ(4, 3)
+#  define ATTRIBUTE_ALLOC_SIZE(args)   __attribute__((__alloc_size__ args))
+# else
+#  define ATTRIBUTE_ALLOC_SIZE(args)   /* empty */
+# endif
+
+# if GNUC_PREREQ(7, 0)
+#  define ATTRIBUTE_FALLTHROUGH        __attribute__((__fallthrough__))
+# else
+#  define ATTRIBUTE_FALLTHROUGH        ((void) 0)
+# endif
+
+# if CLANG_PREREQ(2, 8)
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT                                       \
        _Pragma("clang diagnostic push");                               \
        _Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
-# define DIAG_POP_IGNORE_OVERRIDE_INIT                                 \
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT                                        \
        _Pragma("clang diagnostic pop");
-#elif GNUC_PREREQ(4, 2)
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT                                        \
+# elif GNUC_PREREQ(4, 2)
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT                                       \
        _Pragma("GCC diagnostic push");                                 \
        _Pragma("GCC diagnostic ignored \"-Woverride-init\"");
-# define DIAG_POP_IGNORE_OVERRIDE_INIT                                 \
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT                                        \
        _Pragma("GCC diagnostic pop");
-#else
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT        /* empty */
-# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
-#endif
+# else
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT       /* empty */
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT        /* empty */
+# endif
 
-#if GNUC_PREREQ(6, 0)
-# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE                         \
+# if GNUC_PREREQ(6, 0)
+#  define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE                                \
        _Pragma("GCC diagnostic push");                                 \
        _Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
-# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE                          \
+#  define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE                         \
        _Pragma("GCC diagnostic pop");
-#else
-# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
-# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE  /* empty */
-#endif
+# else
+#  define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE        /* empty */
+#  define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
+# endif
 
 #endif /* !STRACE_GCC_COMPAT_H */
index 7571e43da65b6c205f172f0e8eb8cd230e102f54..ab0181544cf9ae0d8e0e703030e350f04e11d74b 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_GET_PERSONALITY_H
-#define STRACE_GET_PERSONALITY_H
+# define STRACE_GET_PERSONALITY_H
 
-#include "ptrace.h"
+# include "ptrace.h"
 
 extern int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *);
index 23ef351b99f1025808e022b6c3de7dcf18e9c1d2..b5900e0bc40ec8b8dda174507711cbd9f7bc6e80 100644 (file)
@@ -7,21 +7,21 @@
  */
 
 #ifndef STRACE_IPC_DEFS_H
-#define STRACE_IPC_DEFS_H
+# define STRACE_IPC_DEFS_H
 
-#ifdef HAVE_SYS_IPC_H
-# include <sys/ipc.h>
-#elif defined HAVE_LINUX_IPC_H
-# include <linux/ipc.h>
+# ifdef HAVE_SYS_IPC_H
+#  include <sys/ipc.h>
+# elif defined HAVE_LINUX_IPC_H
+#  include <linux/ipc.h>
 /* While glibc uses __key, the kernel uses key. */
-# define __key key
-#endif
+#  define __key key
+# endif
 
-#if !defined IPC_64
-# define IPC_64 0x100
-#endif
+# if !defined IPC_64
+#  define IPC_64 0x100
+# endif
 
-#define PRINTCTL(flagset, arg, dflt)                           \
+# define PRINTCTL(flagset, arg, dflt)                          \
        do {                                                    \
                if ((arg) & IPC_64) {                           \
                        print_xlat(IPC_64);                     \
index 808c2a9c0c741ce21468987719113853a7d7cd7b..f7c2aedb0659a6fc33d7bbb793e6cf74c6d18c1b 100644 (file)
@@ -7,11 +7,11 @@
  */
 
 #ifndef STRACE_KERNEL_TYPES_H
-#define STRACE_KERNEL_TYPES_H
+# define STRACE_KERNEL_TYPES_H
 
 # if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
 
-# include <asm/posix_types.h>
+#  include <asm/posix_types.h>
 
 typedef __kernel_long_t kernel_long_t;
 typedef __kernel_ulong_t kernel_ulong_t;
@@ -35,15 +35,15 @@ typedef struct {
        char            d_name[1];
 } kernel_dirent;
 
-#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
-# define PRI_kl "ll"
-#else
-# define PRI_kl "l"
-#endif
+# if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
+#  define PRI_kl "ll"
+# else
+#  define PRI_kl "l"
+# endif
 
-#define PRI_kld PRI_kl"d"
-#define PRI_klu PRI_kl"u"
-#define PRI_klx PRI_kl"x"
+# define PRI_kld PRI_kl"d"
+# define PRI_klu PRI_kl"u"
+# define PRI_klx PRI_kl"x"
 
 /*
  * The kernel used to define 64-bit types on 64-bit systems on a per-arch
@@ -54,17 +54,17 @@ typedef struct {
  * every printing of __u64 or __s64 to stdint types.
  * The exception is Android, where for MIPS64 unsigned long long is used.
  */
-#if SIZEOF_LONG == 4
-# define PRI__64 "ll"
-#elif defined ALPHA || defined IA64 || defined __powerpc64__ \
+# if SIZEOF_LONG == 4
+#  define PRI__64 "ll"
+# elif defined ALPHA || defined IA64 || defined __powerpc64__ \
       || (defined MIPS && !defined __ANDROID__)
-# define PRI__64 "l"
-#else
-# define PRI__64 "ll"
-#endif
+#  define PRI__64 "l"
+# else
+#  define PRI__64 "ll"
+# endif
 
-#define PRI__d64 PRI__64"d"
-#define PRI__u64 PRI__64"u"
-#define PRI__x64 PRI__64"x"
+# define PRI__d64 PRI__64"d"
+# define PRI__u64 PRI__64"u"
+# define PRI__x64 PRI__64"x"
 
 #endif /* !STRACE_KERNEL_TYPES_H */
index 654ce94d3c3bf81af88d80e1bab59a388582bc16..80fff1a6f270f8dd55424ae7f0ac2a976df63043 100644 (file)
@@ -6,16 +6,16 @@
  */
 
 #ifndef STRACE_KEYCTL_KDF_PARAMS_H
-#define STRACE_KEYCTL_KDF_PARAMS_H
+# define STRACE_KEYCTL_KDF_PARAMS_H
 
-#include <stdint.h>
-#include "kernel_types.h"
+# include <stdint.h>
+# include "kernel_types.h"
 
 /* from include/linux/crypto.h */
-#define CRYPTO_MAX_ALG_NAME            128
+# define CRYPTO_MAX_ALG_NAME           128
 
 /* from security/keys/internal.h */
-#define KEYCTL_KDF_MAX_OI_LEN          64      /* max length of otherinfo */
+# define KEYCTL_KDF_MAX_OI_LEN         64      /* max length of otherinfo */
 
 struct keyctl_kdf_params {
        char *hashname;
index d2880f452ed1d8bace18793b51d56a4d8975b75e..a777b9a4484f2dae08e9d1fe48a743d222df8f66 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 #ifndef STRACE_KILL_SAVE_ERRNO_H
-#define STRACE_KILL_SAVE_ERRNO_H
+# define STRACE_KILL_SAVE_ERRNO_H
 
-#include <sys/types.h>
-#include <signal.h>
-#include <errno.h>
+# include <sys/types.h>
+# include <signal.h>
+# include <errno.h>
 
 static inline int
 kill_save_errno(pid_t pid, int sig)
diff --git a/kvm.c b/kvm.c
index 9a1e2fab32b4344e23646c9bc9ef5293cb8a0adf..04411e3ac23fd2604c9c642c3dcb1ba876a578f9 100644 (file)
--- a/kvm.c
+++ b/kvm.c
@@ -107,7 +107,7 @@ map_len(struct mmap_cache_entry_t *map_info)
                : 0;
 }
 
-#define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
+# define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
 
 static struct vcpu_info*
 vcpu_get_info(struct tcb *const tcp, int fd)
index eebb746b0588170612b87d067b9e0709f7f7c1a7..508882c4b7ea4c17fd21b42214c60bfb3e2621f7 100644 (file)
@@ -9,30 +9,30 @@
  */
 
 #ifndef STRACE_LARGEFILE_WRAPPERS_H
-#define STRACE_LARGEFILE_WRAPPERS_H
+# define STRACE_LARGEFILE_WRAPPERS_H
 
-#include "defs.h"
+# include "defs.h"
 
-#ifdef _LARGEFILE64_SOURCE
-# ifdef HAVE_FOPEN64
-#  define fopen_stream fopen64
+# ifdef _LARGEFILE64_SOURCE
+#  ifdef HAVE_FOPEN64
+#   define fopen_stream fopen64
+#  else
+#   define fopen_stream fopen
+#  endif
+#  define struct_stat struct stat64
+#  define stat_file stat64
+#  define struct_dirent struct dirent64
+#  define read_dir readdir64
+#  define struct_rlimit struct rlimit64
+#  define set_rlimit setrlimit64
 # else
 #  define fopen_stream fopen
+#  define struct_stat struct stat
+#  define stat_file stat
+#  define struct_dirent struct dirent
+#  define read_dir readdir
+#  define struct_rlimit struct rlimit
+#  define set_rlimit setrlimit
 # endif
-# define struct_stat struct stat64
-# define stat_file stat64
-# define struct_dirent struct dirent64
-# define read_dir readdir64
-# define struct_rlimit struct rlimit64
-# define set_rlimit setrlimit64
-#else
-# define fopen_stream fopen
-# define struct_stat struct stat
-# define stat_file stat
-# define struct_dirent struct dirent
-# define read_dir readdir
-# define struct_rlimit struct rlimit
-# define set_rlimit setrlimit
-#endif
 
 #endif /* STRACE_LARGEFILE_WRAPPERS_H */
index 69abe1f2f98568f169263093197fecbf2c6e33fc..aa27e1d5fbbf400b0385fec43a879b00726e1aac 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index b25cb4feb48eb0915e20a0c001ce0b9bcec241fe..f44dd27f80a50d7db699d1899c15162680665709 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 6387c404f91a1c2dacdb7b9dc23833a481129d9c..f51c84ecdbe5d3b0b892da8040289c6eabe53906 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 38d223e6121964e10aa8ff585412d1b025c00665..c052a2983b9ad52d9c17daa4e30744d1e34441f7 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
@@ -17,7 +17,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
 {
        *err = 0;
 
-#ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
+# ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
 
        register kernel_ulong_t rt;
        register kernel_ulong_t r0 __asm__("r0");
@@ -26,7 +26,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
                             : "r"(nr)
                             : "memory");
 
-#else
+# else
 
        register kernel_ulong_t r7 __asm__("r7") = nr;
        register kernel_ulong_t r0 __asm__("r0");
@@ -35,7 +35,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
                             : "r"(r7)
                             : "memory");
 
-#endif
+# endif
 
        return r0;
 }
index 1f4d6a238f5bed7012f5cc0745079121061e64dc..b3510a5d10dfeb80d68d8c984b284404d126ffc4 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_ASM_STAT_H
-#define STRACE_ASM_STAT_H
+# define STRACE_ASM_STAT_H
 
 # undef dev_t
 # undef gid_t
index 01aab228118f80ba5fab195e582e638d621ec1e0..518adb1173200e4c0cd1db4bd6f3bae6ef1dc2b7 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index df2916ac08ba3d19bc7b476e50b08979b526449f..8ac705cc792b9427cb93c799cf53bfefe29c1ed0 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 7653c1850588596cd58601d554af95a79655d476..fa2ca4b306cfcdef46e8add5a349970f88740959 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        int             sig;
index c28bf0ccbb353e37897e866cdc10983b94e578d9..a21ffb68376f2d081b32c3489cb7e157b716b980 100644 (file)
  */
 
 #ifndef STRACE_LINUX_DUMMY_H
-#define STRACE_LINUX_DUMMY_H
+# define STRACE_LINUX_DUMMY_H
 
-#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
-#define        sys_oldfstat            printargs
-#define        sys_oldstat             printargs
-#endif
+# ifndef HAVE_STRUCT___OLD_KERNEL_STAT
+#  define sys_oldfstat         printargs
+#  define sys_oldstat          printargs
+# endif
 
 /* still unfinished */
-#define        sys_rseq                printargs
-#define        sys_vm86                printargs
-#define        sys_vm86old             printargs
+# define sys_rseq              printargs
+# define sys_vm86              printargs
+# define sys_vm86old           printargs
 
 /* machine-specific */
-#ifndef HAVE_STRUCT_USER_DESC
-# define       sys_modify_ldt          printargs
-#endif
+# ifndef HAVE_STRUCT_USER_DESC
+#  define sys_modify_ldt               printargs
+# endif
 
-#if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
-# define       sys_set_thread_area     printargs
-#endif
+# if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
+#  define sys_set_thread_area  printargs
+# endif
 
-#if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
-# define       sys_get_thread_area     printargs
-#endif
+# if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
+#  define sys_get_thread_area  printargs
+# endif
 
-#ifdef ALPHA
-# define       sys_getdtablesize       printargs
-#endif
+# ifdef ALPHA
+#  define sys_getdtablesize    printargs
+# endif
 
 /* like another call */
-#define        sys_acct                sys_chdir
-#define        sys_chroot              sys_chdir
-#define        sys_clock_getres        sys_clock_gettime
-#define        sys_connect             sys_bind
-#define        sys_fchdir              sys_close
-#define        sys_fdatasync           sys_close
-#define        sys_fsync               sys_close
-#define        sys_getegid             sys_getuid
-#define        sys_getegid16           sys_geteuid16
-#define        sys_geteuid             sys_getuid
-#define        sys_geteuid16           sys_getuid16
-#define        sys_getgid              sys_getuid
-#define        sys_getgid16            sys_getuid16
-#define        sys_getpeername         sys_getsockname
-#define        sys_getresgid           sys_getresuid
-#define        sys_getresgid16         sys_getresuid16
-#define        sys_lstat               sys_stat
-#define        sys_lstat64             sys_stat64
-#define        sys_mkdir               sys_chmod
-#define        sys_mkdirat             sys_fchmodat
-#define        sys_mlock               sys_munmap
-#define        sys_mq_unlink           sys_chdir
-#define        sys_munlock             sys_munmap
-#define        sys_oldlstat            sys_oldstat
-#define        sys_pivotroot           sys_link
-#define        sys_rename              sys_link
-#define        sys_rmdir               sys_chdir
-#define        sys_sched_get_priority_max      sys_sched_get_priority_min
-#define        sys_set_robust_list     sys_munmap
-#define        sys_setdomainname       sys_sethostname
-#define        sys_setfsgid            sys_setfsuid
-#define        sys_setfsgid16          sys_setfsuid16
-#define        sys_setgid              sys_setuid
-#define        sys_setgid16            sys_setuid16
-#define        sys_setregid            sys_setreuid
-#define        sys_setregid16          sys_setreuid16
-#define        sys_setresgid           sys_setresuid
-#define        sys_setresgid16         sys_setresuid16
-#define        sys_stime               sys_time
-#define        sys_swapoff             sys_chdir
-#define        sys_symlink             sys_link
-#define        sys_syncfs              sys_close
-#define        sys_umount              sys_chdir
-#define        sys_unlink              sys_chdir
-#define        sys_uselib              sys_chdir
-#define        sys_vfork               sys_fork
+# define sys_acct              sys_chdir
+# define sys_chroot            sys_chdir
+# define sys_clock_getres      sys_clock_gettime
+# define sys_connect           sys_bind
+# define sys_fchdir            sys_close
+# define sys_fdatasync         sys_close
+# define sys_fsync             sys_close
+# define sys_getegid           sys_getuid
+# define sys_getegid16         sys_geteuid16
+# define sys_geteuid           sys_getuid
+# define sys_geteuid16         sys_getuid16
+# define sys_getgid            sys_getuid
+# define sys_getgid16          sys_getuid16
+# define sys_getpeername               sys_getsockname
+# define sys_getresgid         sys_getresuid
+# define sys_getresgid16               sys_getresuid16
+# define sys_lstat             sys_stat
+# define sys_lstat64           sys_stat64
+# define sys_mkdir             sys_chmod
+# define sys_mkdirat           sys_fchmodat
+# define sys_mlock             sys_munmap
+# define sys_mq_unlink         sys_chdir
+# define sys_munlock           sys_munmap
+# define sys_oldlstat          sys_oldstat
+# define sys_pivotroot         sys_link
+# define sys_rename            sys_link
+# define sys_rmdir             sys_chdir
+# define sys_sched_get_priority_max    sys_sched_get_priority_min
+# define sys_set_robust_list   sys_munmap
+# define sys_setdomainname     sys_sethostname
+# define sys_setfsgid          sys_setfsuid
+# define sys_setfsgid16                sys_setfsuid16
+# define sys_setgid            sys_setuid
+# define sys_setgid16          sys_setuid16
+# define sys_setregid          sys_setreuid
+# define sys_setregid16                sys_setreuid16
+# define sys_setresgid         sys_setresuid
+# define sys_setresgid16               sys_setresuid16
+# define sys_stime             sys_time
+# define sys_swapoff           sys_chdir
+# define sys_symlink           sys_link
+# define sys_syncfs            sys_close
+# define sys_umount            sys_chdir
+# define sys_unlink            sys_chdir
+# define sys_uselib            sys_chdir
+# define sys_vfork             sys_fork
 
 /* printargs does the right thing */
-#define        sys_getpgrp             printargs
-#define        sys_getpid              printargs
-#define        sys_getppid             printargs
-#define        sys_gettid              printargs
-#define        sys_idle                printargs
-#define        sys_inotify_init        printargs
-#define        sys_munlockall          printargs
-#define        sys_pause               printargs
-#define        sys_printargs           printargs
-#define        sys_sched_yield         printargs
-#define        sys_setsid              printargs
-#define        sys_set_tid_address     printargs
-#define        sys_setup               printargs
-#define        sys_sync                printargs
-#define        sys_syscall             printargs
-#define        sys_vhangup             printargs
+# define sys_getpgrp           printargs
+# define sys_getpid            printargs
+# define sys_getppid           printargs
+# define sys_gettid            printargs
+# define sys_idle              printargs
+# define sys_inotify_init      printargs
+# define sys_munlockall                printargs
+# define sys_pause             printargs
+# define sys_printargs         printargs
+# define sys_sched_yield               printargs
+# define sys_setsid            printargs
+# define sys_set_tid_address   printargs
+# define sys_setup             printargs
+# define sys_sync              printargs
+# define sys_syscall           printargs
+# define sys_vhangup           printargs
 
 /* printargs_u does the right thing */
-#define        sys_alarm               printargs_u
+# define sys_alarm             printargs_u
 
 /* printargs_d does the right thing */
-#define        sys_exit                printargs_d
-#define        sys_getpgid             printargs_d
-#define        sys_getsid              printargs_d
-#define        sys_nice                printargs_d
-#define        sys_setpgid             printargs_d
-#define        sys_setpgrp             printargs_d
-#define        sys_timer_delete        printargs_d
-#define        sys_timer_getoverrun    printargs_d
+# define sys_exit              printargs_d
+# define sys_getpgid           printargs_d
+# define sys_getsid            printargs_d
+# define sys_nice              printargs_d
+# define sys_setpgid           printargs_d
+# define sys_setpgrp           printargs_d
+# define sys_timer_delete      printargs_d
+# define sys_timer_getoverrun  printargs_d
 
 /* unimplemented */
-#define        sys_afs_syscall         printargs
-#define        sys_break               printargs
-#define        sys_create_module       printargs
-#define        sys_ftime               printargs
-#define        sys_get_kernel_syms     printargs
-#define        sys_getpmsg             printargs
-#define        sys_gtty                printargs
-#define        sys_lock                printargs
-#define        sys_mpx                 printargs
-#define        sys_nfsservctl          printargs
-#define        sys_prof                printargs
-#define        sys_profil              printargs
-#define        sys_putpmsg             printargs
-#define        sys_query_module        printargs
-#define        sys_security            printargs
-#define        sys_stty                printargs
-#define        sys_timerfd             printargs
-#define        sys_tuxcall             printargs
-#define        sys_ulimit              printargs
-#define        sys_vserver             printargs
+# define sys_afs_syscall               printargs
+# define sys_break             printargs
+# define sys_create_module     printargs
+# define sys_ftime             printargs
+# define sys_get_kernel_syms   printargs
+# define sys_getpmsg           printargs
+# define sys_gtty              printargs
+# define sys_lock              printargs
+# define sys_mpx                       printargs
+# define sys_nfsservctl                printargs
+# define sys_prof              printargs
+# define sys_profil            printargs
+# define sys_putpmsg           printargs
+# define sys_query_module      printargs
+# define sys_security          printargs
+# define sys_stty              printargs
+# define sys_timerfd           printargs
+# define sys_tuxcall           printargs
+# define sys_ulimit            printargs
+# define sys_vserver           printargs
 
 /* deprecated */
-#define        sys_bdflush             printargs
-#define        sys_oldolduname         printargs
-#define        sys_olduname            printargs
-#define        sys_sysfs               printargs
+# define sys_bdflush           printargs
+# define sys_oldolduname               printargs
+# define sys_olduname          printargs
+# define sys_sysfs             printargs
 
 #endif /* !STRACE_LINUX_DUMMY_H */
index 53b655d4dc9cecb712f52d561bed0684eac39797..82a4de9444d753eb194115ec9d2beabe955bb395 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 61ae5c5784837425eb2289926c65c7b217012c42..8338cab2ad7d0497e73c54f645e8ec61e1605eab 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        unsigned int    tramp[9];
index 1e8d14419e55f02b1537ead9150a5e5a16e15515..71160397d7417cbff47e2155b300d13df4df8efc 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 4d49930d13beab50bd8a8910591189fd94eacab2..e0ed10d2d15517ae3196adfa65ddcc8bc4b6503e 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        uint32_t        pretcode;
index 2c6a3fcd8ceb3a7d257eb842e8faf1476964345e..1e1f540fe7d496fbcff8ceb77eb6194b97257254 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index c5fb7ef381c872600f2eef957b1d90ed8b1c18e2..3f58dadfc2671b0e9fc5eb478189827957efd883 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        unsigned long           arg0;
@@ -19,7 +19,7 @@ typedef struct {
        struct sigcontext       sc;
 } struct_rt_sigframe;
 
-#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME        \
+# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME       \
                offsetof(struct_rt_sigframe, sc.sc_mask)
 
 #endif /* !STRACE_RT_SIGFRAME_H */
index a4c259ccf00c80b3cfdf79158e9a62a9528a6fed..cb9b7b3a10f50675d3624e6c4115bac4f70e9b3d 100644 (file)
@@ -6,10 +6,10 @@
  */
 
 #ifndef STRACE_LINUX_INET_DIAG_H
-#define STRACE_LINUX_INET_DIAG_H
+# define STRACE_LINUX_INET_DIAG_H
 
-#define TCPDIAG_GETSOCK 18
-#define DCCPDIAG_GETSOCK 19
+# define TCPDIAG_GETSOCK 18
+# define DCCPDIAG_GETSOCK 19
 
 /* Socket identity */
 struct inet_diag_sockid {
index 274a2ee54ce37ef4702e34a1238ab893e5818b4b..345bc76720596a5debcbceb245aac16cadaa65ca 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index a63e81719a8d09e4e6f39292bc88364dbb3cc00e..e40bd745d12d8f098185bf831cdd55194c56f5fa 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        char            *pretcode;
index b827e5ebf9a103750e5163223b2d6307f8b659f0..f8d12d5fcc8d649a117a5d5ba988c54fbcd1d38e 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index fefa57f85cd333583dffffe8ddaae433dbec25f3..fe47aa346367e64e2655d7e991119a303a76ae56 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 328631976d0b0e1270b54a7b74e4f7af88160228..d1d33bc639902311211681c9c7770cebf01afac4 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index aea7e56c92a1308962730972b86a7b9ab982b54a..1c3019ddf7c7030d18378c7b978d37fd904785b8 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        uint32_t        pad[6];
index 6eca85595e1954af5fb3ee01da16a32dd9c041d8..02ea34242c3d0f0e8b22049e2b5745de505a5bf0 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_LINUX_NETLINK_DIAG_H
-#define STRACE_LINUX_NETLINK_DIAG_H
+# define STRACE_LINUX_NETLINK_DIAG_H
 
 struct netlink_diag_req {
        uint8_t sdiag_family;
@@ -45,18 +45,18 @@ enum {
        NETLINK_DIAG_FLAGS,
 };
 
-#define NDIAG_SHOW_MEMINFO             0x00000001
-#define NDIAG_SHOW_GROUPS              0x00000002
-#define NDIAG_SHOW_RING_CFG            0x00000004 /* deprecated since 4.6 */
-#define NDIAG_SHOW_FLAGS               0x00000008
-#define NDIAG_PROTO_ALL                        ((uint8_t) ~0)
+# define NDIAG_SHOW_MEMINFO            0x00000001
+# define NDIAG_SHOW_GROUPS             0x00000002
+# define NDIAG_SHOW_RING_CFG           0x00000004 /* deprecated since 4.6 */
+# define NDIAG_SHOW_FLAGS              0x00000008
+# define NDIAG_PROTO_ALL                       ((uint8_t) ~0)
 
 /* flags */
-#define NDIAG_FLAG_CB_RUNNING          0x00000001
-#define NDIAG_FLAG_PKTINFO             0x00000002
-#define NDIAG_FLAG_BROADCAST_ERROR     0x00000004
-#define NDIAG_FLAG_NO_ENOBUFS          0x00000008
-#define NDIAG_FLAG_LISTEN_ALL_NSID     0x00000010
-#define NDIAG_FLAG_CAP_ACK             0x00000020
+# define NDIAG_FLAG_CB_RUNNING         0x00000001
+# define NDIAG_FLAG_PKTINFO            0x00000002
+# define NDIAG_FLAG_BROADCAST_ERROR    0x00000004
+# define NDIAG_FLAG_NO_ENOBUFS         0x00000008
+# define NDIAG_FLAG_LISTEN_ALL_NSID    0x00000010
+# define NDIAG_FLAG_CAP_ACK            0x00000020
 
 #endif /* !STRACE_LINUX_NETLINK_DIAG_H */
index f9885ee67a60fc915bbc60b395ce459090ee93d7..3c28e6208e832fd6db5951f28ea536b8560670a6 100644 (file)
@@ -6,6 +6,6 @@
  */
 
 static struct user_pt_regs nios2_regs;
-# define ARCH_REGS_FOR_GETREGSET nios2_regs
+#define ARCH_REGS_FOR_GETREGSET nios2_regs
 #define ARCH_PC_REG nios2_regs.regs[PTR_EA]
 #define ARCH_SP_REG nios2_regs.regs[PTR_SP]
index 85338d5d1dc459c40325f179bea09f286a1f1c3b..02f6e7ee70e028abc9281b9380584a54450e6d40 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 33ff0f8f5cd7b795a7d5889beedd890fc25ae2e5..e31df27e8ca4f6088a307c562ad9a3ba2d08bfba 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index d3a4bcf5c6e2d60e2c9d2aa25f969c1d31be404d..0efb767526eb0a8073a19460853030946ad2c2fa 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_LINUX_PACKET_DIAG_H
-#define STRACE_LINUX_PACKET_DIAG_H
+# define STRACE_LINUX_PACKET_DIAG_H
 
 struct packet_diag_req {
        uint8_t sdiag_family;
@@ -17,12 +17,12 @@ struct packet_diag_req {
        uint32_t pdiag_cookie[2];
 };
 
-#define PACKET_SHOW_INFO       0x00000001
-#define PACKET_SHOW_MCLIST     0x00000002
-#define PACKET_SHOW_RING_CFG   0x00000004
-#define PACKET_SHOW_FANOUT     0x00000008
-#define PACKET_SHOW_MEMINFO    0x00000010
-#define PACKET_SHOW_FILTER     0x00000020
+# define PACKET_SHOW_INFO      0x00000001
+# define PACKET_SHOW_MCLIST    0x00000002
+# define PACKET_SHOW_RING_CFG  0x00000004
+# define PACKET_SHOW_FANOUT    0x00000008
+# define PACKET_SHOW_MEMINFO   0x00000010
+# define PACKET_SHOW_FILTER    0x00000020
 
 struct packet_diag_msg {
        uint8_t pdiag_family;
@@ -52,11 +52,11 @@ struct packet_diag_info {
        uint32_t pdi_tstamp;
        uint32_t pdi_flags;
 
-#define PDI_RUNNING    0x1
-#define PDI_AUXDATA    0x2
-#define PDI_ORIGDEV    0x4
-#define PDI_VNETHDR    0x8
-#define PDI_LOSS       0x10
+# define PDI_RUNNING   0x1
+# define PDI_AUXDATA   0x2
+# define PDI_ORIGDEV   0x4
+# define PDI_VNETHDR   0x8
+# define PDI_LOSS      0x10
 };
 
 struct packet_diag_mclist {
index b49b85a2fd298593ed82ef5e1cb36146f0cc2506..1a614135c2232a2e120289e5e8baf14e367b0d66 100644 (file)
@@ -5,7 +5,7 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#define        SIGNAL_FRAMESIZE32      64
+#define SIGNAL_FRAMESIZE32     64
 
 FUNC_GET_RT_SIGFRAME_ADDR
 {
index 5da1d9ae06500f6d86f8bfb3b30d11b0a6beb217..e023fcd1c5e486eec3ccaf46bcd8f50db9929163 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 28c1b3a49f06f383a60a53f994be822c613fd7ac..17ef72b5202582e0a0777e864b102359e03ec7a8 100644 (file)
@@ -6,13 +6,13 @@
  */
 
 #undef FUNC_GET_RT_SIGFRAME_ADDR
-#define        FUNC_GET_RT_SIGFRAME_ADDR       \
+#define FUNC_GET_RT_SIGFRAME_ADDR      \
        static kernel_ulong_t ppc_get_rt_sigframe_addr(struct tcb *tcp)
 
 #include "powerpc/arch_rt_sigframe.c"
 
 #undef FUNC_GET_RT_SIGFRAME_ADDR
-#define        FUNC_GET_RT_SIGFRAME_ADDR       DEF_FUNC_GET_RT_SIGFRAME_ADDR
+#define FUNC_GET_RT_SIGFRAME_ADDR      DEF_FUNC_GET_RT_SIGFRAME_ADDR
 
 FUNC_GET_RT_SIGFRAME_ADDR
 {
index ca0d8b7a3b28eb7bfef8d6256128d7b401aacae6..e069b11cd6fe0aff57c1f5e95190100ee63d1813 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 10f92e00a424045a869057a570b0fc8c4fd5ea2a..959db22b40489a30a6be9f3f98f014c0ab2e0a6d 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 /* This is a generic definition for compatible architectures. */
 
index c9805867ee674023eb641a2bea6912f78c0d2a0d..96d6230eba022ba01b80173fe870c8dbbf16dac5 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index cf6915056da648c7a7c20133e4fb02cd8ceca7f6..e11573a43ff19e5abd9aacc72ccfb7aa4b466f4e 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        uint8_t         callee_used_stack[__SIGNAL_FRAMESIZE];
index e03caed6ed778b15535af20d2d2ad100b05cc78a..1c2f8136b7739e82fe4dfb16b0d5c08a02bfaec5 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 60f53bef6079751603fdb9c6416d10e22403a130..f8da655470007a61977bbc05e3f907b31ad95302 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        siginfo_t       *pinfo;
index 1cb3a8065cde689c7231e5733718950e7350801e..c4f2088bcdb09747ab548ecd6abf27d30a73dca2 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 #ifndef STRACE_LINUX_SMC_DIAG_H
-#define STRACE_LINUX_SMC_DIAG_H
+# define STRACE_LINUX_SMC_DIAG_H
 
-#include <linux/inet_diag.h>
+# include <linux/inet_diag.h>
 
-#include "gcc_compat.h"
+# include "gcc_compat.h"
 
 /* Request structure */
 struct smc_diag_req {
index 718414b22681f90badf52f73c726383310bfb437..50ce15eac19890d35403105c4eda6f0a17c9a3d0 100644 (file)
@@ -6,12 +6,12 @@
  */
 
 #ifndef STRACE_LINUX_SOCK_DIAG_H
-#define STRACE_LINUX_SOCK_DIAG_H
+# define STRACE_LINUX_SOCK_DIAG_H
 
-#define SOCK_DIAG_BY_FAMILY 20
-#define SOCK_DESTROY 21
+# define SOCK_DIAG_BY_FAMILY 20
+# define SOCK_DESTROY 21
 
-#define SK_MEMINFO_VARS                9
+# define SK_MEMINFO_VARS               9
 
 struct sock_diag_req {
        uint8_t sdiag_family;
index b9bf3a10b406bc5c6f34a03cbebd0da8ea7d66bf..d4799fde0a3cbe44ff6952a84c41d96e413f9478 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index f9a1483b3b25403544ac3dfb12ee049a3bc3470c..eb2e04101ec1f29a94d7ed6b0f2a94241cb90185 100644 (file)
@@ -6,10 +6,10 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include "ptrace.h"
-#include <signal.h>
+# include "ptrace.h"
+# include <signal.h>
 
 typedef struct {
        struct sparc_stackf     ss;
@@ -19,7 +19,7 @@ typedef struct {
        /* more data follows */
 } struct_rt_sigframe;
 
-#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME        \
+# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME       \
                offsetof(struct_rt_sigframe, mask)
 
 #endif /* !STRACE_RT_SIGFRAME_H */
index 55a4452a9e09b90fe8646b92785bee2e6a5eba32..3af454d26fb2b00a494234c3fb1183c6af8224b7 100644 (file)
@@ -5,7 +5,7 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#define        STACK_BIAS      2047
+#define STACK_BIAS     2047
 
 FUNC_GET_RT_SIGFRAME_ADDR
 {
index ecedf188922d44b6874255c759b900665b17f604..efb732772f6a3a0d939801228a012ae734897cdb 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 78490a52d06f60eaf51d3db03f05462e4df92838..d770eab4ec5b8dd879947822fae32774f4c8841d 100644 (file)
@@ -8,13 +8,13 @@
  */
 
 #ifndef STRACE_LINUX_SYSCALL_H
-#define STRACE_LINUX_SYSCALL_H
+# define STRACE_LINUX_SYSCALL_H
 
-#include "dummy.h"
-#include "sys_func.h"
-#include "sen.h"
+# include "dummy.h"
+# include "sys_func.h"
+# include "sen.h"
 
-#if HAVE_ARCH_UID16_SYSCALLS
+# if HAVE_ARCH_UID16_SYSCALLS
 extern SYS_FUNC(chown16);
 extern SYS_FUNC(fchown16);
 extern SYS_FUNC(getgroups16);
@@ -25,6 +25,6 @@ extern SYS_FUNC(setgroups16);
 extern SYS_FUNC(setresuid16);
 extern SYS_FUNC(setreuid16);
 extern SYS_FUNC(setuid16);
-#endif /* HAVE_ARCH_UID16_SYSCALLS */
+# endif /* HAVE_ARCH_UID16_SYSCALLS */
 
 #endif /* !STRACE_LINUX_SYSCALL_H */
index e290417035eca873d93110f0d85078a1f07da1a2..c006ad1e37a6826aa3d4694b43a360a9e8eb6df8 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index e4bb114b5dcaafe7ee094465022c182c5a932031..0605065075ec500f809fdcc33ec5e7c29e026c2e 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_RT_SIGFRAME_H
-#define STRACE_RT_SIGFRAME_H
+# define STRACE_RT_SIGFRAME_H
 
-#include <signal.h>
+# include <signal.h>
 
 typedef struct {
        unsigned char   save_area[C_ABI_SAVE_AREA_SIZE];
index d6477aee578125fa0414cad71585a09958404ecb..1d15a0ce047a5d090311b992d2455a00f8130119 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_LINUX_UNIX_DIAG_H
-#define STRACE_LINUX_UNIX_DIAG_H
+# define STRACE_LINUX_UNIX_DIAG_H
 
 struct unix_diag_req {
        uint8_t  sdiag_family;
@@ -18,12 +18,12 @@ struct unix_diag_req {
        uint32_t udiag_cookie[2];
 };
 
-#define UDIAG_SHOW_NAME                0x01
-#define UDIAG_SHOW_VFS         0x02
-#define UDIAG_SHOW_PEER                0x04
-#define UDIAG_SHOW_ICONS       0x08
-#define UDIAG_SHOW_RQLEN       0x10
-#define UDIAG_SHOW_MEMINFO     0x20
+# define UDIAG_SHOW_NAME               0x01
+# define UDIAG_SHOW_VFS                0x02
+# define UDIAG_SHOW_PEER               0x04
+# define UDIAG_SHOW_ICONS      0x08
+# define UDIAG_SHOW_RQLEN      0x10
+# define UDIAG_SHOW_MEMINFO    0x20
 
 struct unix_diag_msg {
        uint8_t  udiag_family;
index fc313a815ed305410b23c01b88987be5904f182a..1dcc6932d7787d165075a75bb20190d00f5cbec3 100644 (file)
@@ -25,9 +25,9 @@ get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 
        kernel_ulong_t scno = sci->entry.nr;
 
-#ifndef __X32_SYSCALL_BIT
-# define __X32_SYSCALL_BIT     0x40000000
-#endif
+# ifndef __X32_SYSCALL_BIT
+#  define __X32_SYSCALL_BIT    0x40000000
+# endif
 
        if (pers == 0 && (scno & __X32_SYSCALL_BIT)) {
                /*
index 56b473f0389ce67d560ce7b68fcb9925f531d9b1..91dd1aafc30fd2ef0ede194303a2e95bb92c0ee9 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_X86_64_ASM_STAT_H
-#define STRACE_X86_64_ASM_STAT_H
+# define STRACE_X86_64_ASM_STAT_H
 
 # if defined __x86_64__ && defined __ILP32__
 #  define stat redirect_kernel_stat
index 5cdcfd395c00345e274091b8379e75813576c0c0..0a274888ac91d560592cd74dd16edaafa03dd086 100644 (file)
@@ -50,9 +50,9 @@ arch_get_scno(struct tcb *tcp)
                        if ((long long) x86_64_regs.orig_rax != -1) {
                                currpers = 2;
                        } else {
-# ifdef X32
+#ifdef X32
                                currpers = 2;
-# endif
+#endif
                        }
                }
        }
index e28324837fde7570a70c9f9c501b40885cd28777..66c3eaf9741f47205cebde0b69a9e7a261802d78 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
index 2f0e379f5727cdfa57670d70c20b9785a04bcb46..883860ed8545ccff9bf6583bbdbb56fd72df5040 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
 
 # include "kernel_types.h"
 
diff --git a/loop.c b/loop.c
index 466950e1cf7387e708d7863fa549b48be8f237d1..36a40c5575d9a44bd1a60b6482bd5e1fd94ff95d 100644 (file)
--- a/loop.c
+++ b/loop.c
@@ -19,7 +19,7 @@ typedef struct loop_info struct_loop_info;
 #include "print_fields.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/loop_cmds.h"
+#include "xlat/loop_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #include "xlat/loop_flags_options.h"
diff --git a/lseek.c b/lseek.c
index 263e9284f668cc8137f9f4efd1660608c9b5cbf1..c3c9be79dcf4001424f37d0b807a63e26dabbff3 100644 (file)
--- a/lseek.c
+++ b/lseek.c
@@ -30,11 +30,11 @@ SYS_FUNC(lseek)
 
        kernel_long_t offset;
 
-# ifndef current_klongsize
+#ifndef current_klongsize
        if (current_klongsize < sizeof(kernel_long_t)) {
                offset = (int) tcp->u_arg[1];
        } else
-# endif /* !current_klongsize */
+#endif /* !current_klongsize */
        {
                offset = tcp->u_arg[1];
        }
index dc2a2373bc3f10357ead2dfa665a9138f6b705d0..7f019480779c91c1ebc9e6be215ad0c1b55021e8 100644 (file)
--- a/macros.h
+++ b/macros.h
@@ -6,36 +6,36 @@
  */
 
 #ifndef STRACE_MACROS_H
-#define STRACE_MACROS_H
+# define STRACE_MACROS_H
 
-#include <stdbool.h>
-#include <sys/types.h>
+# include <stdbool.h>
+# include <sys/types.h>
 
-#include "gcc_compat.h"
+# include "gcc_compat.h"
 
-#define ARRAY_SIZE(a_) (sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
+# define ARRAY_SIZE(a_)        (sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
 
-#define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
+# define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
 
-#define STRINGIFY(...)         #__VA_ARGS__
-#define STRINGIFY_VAL(...)     STRINGIFY(__VA_ARGS__)
+# define STRINGIFY(...)                #__VA_ARGS__
+# define STRINGIFY_VAL(...)    STRINGIFY(__VA_ARGS__)
 
-#ifndef MAX
-# define MAX(a, b)             (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef MIN
-# define MIN(a, b)             (((a) < (b)) ? (a) : (b))
-#endif
-#define CLAMP(val, min, max)   MIN(MAX(min, val), max)
+# ifndef MAX
+#  define MAX(a, b)            (((a) > (b)) ? (a) : (b))
+# endif
+# ifndef MIN
+#  define MIN(a, b)            (((a) < (b)) ? (a) : (b))
+# endif
+# define CLAMP(val, min, max)  MIN(MAX(min, val), max)
 
-#ifndef ROUNDUP
-# define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
-#endif
+# ifndef ROUNDUP
+#  define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
+# endif
 
-#ifndef offsetofend
-# define offsetofend(type_, member_)   \
+# ifndef offsetofend
+#  define offsetofend(type_, member_)  \
        (offsetof(type_, member_) + sizeof(((type_ *)0)->member_))
-#endif
+# endif
 
 static inline bool
 is_filled(const char *ptr, char fill, size_t size)
@@ -47,7 +47,7 @@ is_filled(const char *ptr, char fill, size_t size)
        return true;
 }
 
-#define IS_ARRAY_ZERO(arr_)    \
+# define IS_ARRAY_ZERO(arr_)   \
        is_filled((const char *) (arr_), 0, sizeof(arr_) + MUST_BE_ARRAY(arr_))
 
 #endif /* !STRACE_MACROS_H */
index 57eccdc39bd5cd797240aad46cbf6431851bd066..aec62bf18bd2a319c66fe1a3f8934287d0f5ab3d 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef STRACE_MMAP_CACHE_H
-#define STRACE_MMAP_CACHE_H
+# define STRACE_MMAP_CACHE_H
 
 /*
  * Keep a sorted array of cache entries,
index 586c26e6252182e67f5114358b4a9690190b96b1..e0272ce700dec77bcfe7aaf89cb3804b8a2f0264 100644 (file)
@@ -5,9 +5,9 @@
  */
 
 #ifndef STRACE_MMAP_NOTIFY_H
-#define STRACE_MMAP_NOTIFY_H
+# define STRACE_MMAP_NOTIFY_H
 
-#include "defs.h"
+# include "defs.h"
 
 typedef void (*mmap_notify_fn)(struct tcb *, void *);
 
index b337575280eab64c3d0a18cb1d64c400b4df2f34..111947c3c99f8993cafeb050aed12e45603d0343 100644 (file)
@@ -8,28 +8,28 @@
  */
 
 #ifndef STRACE_MPERS_TYPE_H
-#define STRACE_MPERS_TYPE_H
+# define STRACE_MPERS_TYPE_H
 
-#include "macros.h"
+# include "macros.h"
 
-#ifdef IN_MPERS
-# define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
-# ifdef MPERS_IS_m32
-#  define MPERS_PREFIX m32_
-#  define MPERS_DEFS "m32_type_defs.h"
-# elif defined MPERS_IS_mx32
-#  define MPERS_PREFIX mx32_
-#  define MPERS_DEFS "mx32_type_defs.h"
-# endif
-#else
-# define MPERS_PREFIX
-# define DEF_MPERS_TYPE(args) "empty.h"
-# if IN_MPERS_BOOTSTRAP
-#  define MPERS_DEFS "empty.h"
+# ifdef IN_MPERS
+#  define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
+#  ifdef MPERS_IS_m32
+#   define MPERS_PREFIX m32_
+#   define MPERS_DEFS "m32_type_defs.h"
+#  elif defined MPERS_IS_mx32
+#   define MPERS_PREFIX mx32_
+#   define MPERS_DEFS "mx32_type_defs.h"
+#  endif
 # else
-#  define MPERS_DEFS "native_defs.h"
-# endif
+#  define MPERS_PREFIX
+#  define DEF_MPERS_TYPE(args) "empty.h"
+#  if IN_MPERS_BOOTSTRAP
+#   define MPERS_DEFS "empty.h"
+#  else
+#   define MPERS_DEFS "native_defs.h"
+#  endif
 typedef unsigned long mpers_ptr_t;
-#endif
+# endif
 
 #endif /* !STRACE_MPERS_TYPE_H */
index 40863807ea050ae33ab6c49ece90d2856a66e2f9..e3dbe6a41ac80687e176628d5c2aa55a1c220188 100644 (file)
--- a/msghdr.h
+++ b/msghdr.h
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_MSGHDR_H
-#define STRACE_MSGHDR_H
+# define STRACE_MSGHDR_H
 
 /* For definitions of struct msghdr and struct mmsghdr. */
 # include <sys/socket.h>
index ced9a4cd5da295b28eab4720c21ec38075fa9bea..11cc05e63b4a3c4267a3773da984e1960297c22d 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/nbd.h>
 
 #define XLAT_MACROS_ONLY
-# include "xlat/nbd_ioctl_cmds.h"
+#include "xlat/nbd_ioctl_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #include "xlat/nbd_ioctl_flags.h"
index f93c00ae90f11f8c2c8645c8b8bcc7c9dc800616..0e9e9a2eea732b6dae40e5cfb597db8267631e7d 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef STRACE_NEGATED_ERRNO_H
-#define STRACE_NEGATED_ERRNO_H
+# define STRACE_NEGATED_ERRNO_H
 
 /*
  * Check the syscall return value register value for whether it is
@@ -18,12 +18,12 @@ is_negated_errno(kernel_ulong_t val)
 {
        kernel_ulong_t max = -(kernel_long_t) MAX_ERRNO_VALUE;
 
-#ifndef current_klongsize
+# ifndef current_klongsize
        if (current_klongsize < sizeof(val)) {
                val = (uint32_t) val;
                max = (uint32_t) max;
        }
-#endif /* !current_klongsize */
+# endif /* !current_klongsize */
 
        return val >= max;
 }
diff --git a/net.c b/net.c
index a87bdf74103126a31a9957d01f3ed8ae0e28784d..65e78494173cb1aab13412a8203a4f537f25fa33 100644 (file)
--- a/net.c
+++ b/net.c
@@ -65,8 +65,8 @@
 #include "xlat/inet_protocols.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/addrfams.h"
-# include "xlat/ethernet_protocols.h"
+#include "xlat/addrfams.h"
+#include "xlat/ethernet_protocols.h"
 #undef XLAT_MACROS_ONLY
 #include "xlat/ax25_protocols.h"
 #include "xlat/irda_protocols.h"
index 66db510b601d35ea8ee34dca22a98f9f2c416d24..a079362e8ad248dd49c082add0b340843c0da7cf 100644 (file)
--- a/netlink.h
+++ b/netlink.h
@@ -7,42 +7,42 @@
  */
 
 #ifndef STRACE_NETLINK_H
-#define STRACE_NETLINK_H
-
-#include <stdbool.h>
-#include <sys/socket.h>
-#include <linux/netlink.h>
-
-#ifndef NETLINK_SOCK_DIAG
-# define NETLINK_SOCK_DIAG 4
-#endif
-
-#ifndef NLM_F_NONREC
-# define NLM_F_NONREC  0x100
-#endif
-#ifndef NLM_F_CAPPED
-# define NLM_F_CAPPED  0x100
-#endif
-
-#undef NLMSG_HDRLEN
-#define NLMSG_HDRLEN ((unsigned int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
-
-#ifndef NLMSG_MIN_TYPE
-# define NLMSG_MIN_TYPE                0x10
-#endif
-
-#ifndef NLA_ALIGN
-# define NLA_ALIGN(len) (((len) + 3) & ~3)
-#endif
-
-#undef NLA_HDRLEN
-#define NLA_HDRLEN ((unsigned int) NLA_ALIGN(sizeof(struct nlattr)))
-
-#ifndef NLA_TYPE_MASK
-# define NLA_F_NESTED          (1 << 15)
-# define NLA_F_NET_BYTEORDER   (1 << 14)
-# define NLA_TYPE_MASK         ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
-#endif
+# define STRACE_NETLINK_H
+
+# include <stdbool.h>
+# include <sys/socket.h>
+# include <linux/netlink.h>
+
+# ifndef NETLINK_SOCK_DIAG
+#  define NETLINK_SOCK_DIAG 4
+# endif
+
+# ifndef NLM_F_NONREC
+#  define NLM_F_NONREC 0x100
+# endif
+# ifndef NLM_F_CAPPED
+#  define NLM_F_CAPPED 0x100
+# endif
+
+# undef NLMSG_HDRLEN
+# define NLMSG_HDRLEN ((unsigned int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
+
+# ifndef NLMSG_MIN_TYPE
+#  define NLMSG_MIN_TYPE               0x10
+# endif
+
+# ifndef NLA_ALIGN
+#  define NLA_ALIGN(len) (((len) + 3) & ~3)
+# endif
+
+# undef NLA_HDRLEN
+# define NLA_HDRLEN ((unsigned int) NLA_ALIGN(sizeof(struct nlattr)))
+
+# ifndef NLA_TYPE_MASK
+#  define NLA_F_NESTED         (1 << 15)
+#  define NLA_F_NET_BYTEORDER  (1 << 14)
+#  define NLA_TYPE_MASK                ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
+# endif
 
 static inline bool
 is_nlmsg_ok(const struct nlmsghdr *const nlh, const ssize_t len)
index a73b8b5f0ff292e4ea19c82f908b95052c5467ad..3aea2532a9a23ea059968826aa254e269bc74287 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_NETLINK_KOBJECT_UEVENT_H
-#define STRACE_NETLINK_KOBJECT_UEVENT_H
+# define STRACE_NETLINK_KOBJECT_UEVENT_H
 
 struct udev_monitor_netlink_header {
        /* "libudev" prefix to distinguish libudev and kernel messages */
index 1fd1ebdedb09f484735048922d96f4a1e6b2cd46..62aecf7f8eaecd7dc840fa1e93afbc138f4a144e 100644 (file)
@@ -8,9 +8,9 @@
  */
 
 #ifndef STRACE_NETLINK_ROUTE_H
-#define STRACE_NETLINK_ROUTE_H
+# define STRACE_NETLINK_ROUTE_H
 
-#define DECL_NETLINK_ROUTE_DECODER(route_decode_name)  \
+# define DECL_NETLINK_ROUTE_DECODER(route_decode_name) \
 void                                                   \
 route_decode_name(struct tcb *tcp,                     \
                  const struct nlmsghdr *nlmsghdr,      \
index 25809fc8d743f7ce14f46ef1cc554c3572bd4ab4..9255c0de1a8cd20bca004499c9f902eaec7d2acf 100644 (file)
@@ -65,7 +65,7 @@ print_smc_diag_cursor(const struct smc_diag_cursor *const cursor)
        tprints("}");
 }
 
-# define PRINT_FIELD_SMC_DIAG_CURSOR(prefix_, where_, field_)          \
+#define PRINT_FIELD_SMC_DIAG_CURSOR(prefix_, where_, field_)           \
        do {                                                            \
                tprintf("%s%s=", (prefix_), #field_);                   \
                print_smc_diag_cursor(&(where_).field_);                \
index 72937e218b281cedd166e9241546af08a02ac8db..95fbc3390a4bc831279a24453d65b98a606bb7cb 100644 (file)
@@ -7,9 +7,9 @@
  */
 
 #ifndef STRACE_NETLINK_SOCK_DIAG_H
-#define STRACE_NETLINK_SOCK_DIAG_H
+# define STRACE_NETLINK_SOCK_DIAG_H
 
-#define DECL_NETLINK_DIAG_DECODER(diag_decode_name)    \
+# define DECL_NETLINK_DIAG_DECODER(diag_decode_name)   \
 void                                                   \
 diag_decode_name(struct tcb *tcp,                      \
                 const struct nlmsghdr *nlmsghdr,       \
@@ -34,7 +34,7 @@ struct inet_diag_sockid;
 extern void
 print_inet_diag_sockid(const struct inet_diag_sockid *, const uint8_t family);
 
-#define PRINT_FIELD_INET_DIAG_SOCKID(prefix_, where_, field_, af_)     \
+# define PRINT_FIELD_INET_DIAG_SOCKID(prefix_, where_, field_, af_)    \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_inet_diag_sockid(&(where_).field_, (af_));        \
index fe7ee864c632acfb7bebf8dd4a8b76beb16fb039..a11f2f1d2d332ca9cc6b550e00b68fcf3600003d 100644 (file)
--- a/nlattr.h
+++ b/nlattr.h
@@ -8,9 +8,9 @@
  */
 
 #ifndef STRACE_NLATTR_H
-#define STRACE_NLATTR_H
+# define STRACE_NLATTR_H
 
-#include "xlat.h"
+# include "xlat.h"
 
 struct decode_nla_xlat_opts {
        const struct xlat *xlat;
@@ -52,7 +52,7 @@ decode_nlattr(struct tcb *,
              unsigned int size,
              const void *opaque_data);
 
-#define DECL_NLA(name)                                 \
+# define DECL_NLA(name)                                        \
 extern bool                                            \
 decode_nla_ ## name(struct tcb *, kernel_ulong_t addr, \
                    unsigned int len, const void *)     \
diff --git a/nsfs.h b/nsfs.h
index 06e7f2021a0281a8ec31939d302eaf634a3a1e7d..0f8106a9e94ab83f7f1342dcd41be3188f73c1c0 100644 (file)
--- a/nsfs.h
+++ b/nsfs.h
@@ -6,23 +6,23 @@
  */
 
 #ifndef STRACE_NSFS_H
-#define STRACE_NSFS_H
+# define STRACE_NSFS_H
 
-#include <linux/ioctl.h>
+# include <linux/ioctl.h>
 
-#ifdef HAVE_LINUX_NSFS_H
-# include <linux/nsfs.h>
-#else
-# define NSIO    0xb7
-# define NS_GET_USERNS   _IO(NSIO, 0x1)
-# define NS_GET_PARENT   _IO(NSIO, 0x2)
-#endif
+# ifdef HAVE_LINUX_NSFS_H
+#  include <linux/nsfs.h>
+# else
+#  define NSIO    0xb7
+#  define NS_GET_USERNS   _IO(NSIO, 0x1)
+#  define NS_GET_PARENT   _IO(NSIO, 0x2)
+# endif
 
-#ifndef NS_GET_NSTYPE
-# define NS_GET_NSTYPE    _IO(NSIO, 0x3)
-#endif
-#ifndef NS_GET_OWNER_UID
-# define NS_GET_OWNER_UID _IO(NSIO, 0x4)
-#endif
+# ifndef NS_GET_NSTYPE
+#  define NS_GET_NSTYPE    _IO(NSIO, 0x3)
+# endif
+# ifndef NS_GET_OWNER_UID
+#  define NS_GET_OWNER_UID _IO(NSIO, 0x4)
+# endif
 
 #endif /* !STRACE_NSFS_H */
diff --git a/nsig.h b/nsig.h
index 33ef9eec85e3178d5699a4d88a9749044278aecd..7724a5704a1491d27d68cc7dd4c9b047c3ab1c16 100644 (file)
--- a/nsig.h
+++ b/nsig.h
@@ -6,17 +6,17 @@
  */
 
 #ifndef STRACE_NSIG_H
-#define STRACE_NSIG_H
+# define STRACE_NSIG_H
 
-#include <signal.h>
+# include <signal.h>
 
-#ifndef NSIG
-# warning NSIG is not defined, using 32
-# define NSIG  32
-#elif NSIG < 32
-# error NSIG < 32
-#endif
+# ifndef NSIG
+#  warning NSIG is not defined, using 32
+#  define NSIG  32
+# elif NSIG < 32
+#  error NSIG < 32
+# endif
 
-#define NSIG_BYTES     (NSIG / 8)
+# define NSIG_BYTES    (NSIG / 8)
 
 #endif /* !STRACE_NSIG_H */
index 6a5ece16006a5963249a9977971f5f134b1311d5..77dc3a9c02609f067c9709cb57e937609b2277e2 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_NUMBER_SET_H
-#define STRACE_NUMBER_SET_H
+# define STRACE_NUMBER_SET_H
 
-#include "gcc_compat.h"
+# include "gcc_compat.h"
 
 struct number_set;
 
index f442021909489d1ccfa575da1e662ffc93e8fd39..99a0f6f96e8f01f651eaace2c8d7be6725afce22 100644 (file)
 
 #ifdef OR1K
 
-#define OR1K_ATOMIC_SWAP       1
-#define OR1K_ATOMIC_CMPXCHG    2
-#define OR1K_ATOMIC_XCHG       3
-#define OR1K_ATOMIC_ADD                4
-#define OR1K_ATOMIC_DECPOS     5
-#define OR1K_ATOMIC_AND                6
-#define OR1K_ATOMIC_OR         7
-#define OR1K_ATOMIC_UMAX       8
-#define OR1K_ATOMIC_UMIN       9
-
-#include "xlat/atomic_ops.h"
+# define OR1K_ATOMIC_SWAP      1
+# define OR1K_ATOMIC_CMPXCHG   2
+# define OR1K_ATOMIC_XCHG      3
+# define OR1K_ATOMIC_ADD               4
+# define OR1K_ATOMIC_DECPOS    5
+# define OR1K_ATOMIC_AND               6
+# define OR1K_ATOMIC_OR                7
+# define OR1K_ATOMIC_UMAX      8
+# define OR1K_ATOMIC_UMIN      9
+
+# include "xlat/atomic_ops.h"
 
 SYS_FUNC(or1k_atomic)
 {
diff --git a/perf.c b/perf.c
index 758364f8b1fdb6b6480a741f34e988e72e404147..d3a98166002fbaaa3c5492099e32af3d60db319f 100644 (file)
--- a/perf.c
+++ b/perf.c
@@ -114,7 +114,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
         * offsetofend against size) in order to print fields as kernel sees
         * them. This also should work great on big endian architectures.
         */
-       #define _PERF_CHECK_FIELD(_field) \
+#define _PERF_CHECK_FIELD(_field) \
                do { \
                        if (offsetof(struct perf_event_attr, _field) >= size) \
                                goto print_perf_event_attr_out; \
index 0e1f82a8df07a4cb89e3ae5f454771145a469cc0..b9489a65c5c5cb55c51da7e3e1750a37dc5ced53 100644 (file)
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_LINUX_PERF_EVENT_STRUCT_H
-#define STRACE_LINUX_PERF_EVENT_STRUCT_H
+# define STRACE_LINUX_PERF_EVENT_STRUCT_H
 
-#include <stdint.h>
+# include <stdint.h>
 
 struct perf_event_attr {
        uint32_t type;
index c2213f203cf6193738d422dbf2e0f77294b98c25..427aa9eb997d2dcf781c5253a27e341972f0c79e 100644 (file)
@@ -12,7 +12,7 @@
 #include "perf_event_struct.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/perf_ioctl_cmds.h"
+#include "xlat/perf_ioctl_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #include "xlat/perf_ioctl_flags.h"
index 786ee4c3633b95c14b2463cbbfdc96c3d3a535f1..bcab1b733754250a9bf74c0c8f91debaa982cb5b 100644 (file)
@@ -7,55 +7,55 @@
  */
 
 #ifndef STRACE_PRINT_FIELDS_H
-#define STRACE_PRINT_FIELDS_H
+# define STRACE_PRINT_FIELDS_H
 
 /*
  * The printf-like function to use in header files
  * shared between strace and its tests.
  */
-#ifndef STRACE_PRINTF
-# define STRACE_PRINTF tprintf
-#endif
+# ifndef STRACE_PRINTF
+#  define STRACE_PRINTF tprintf
+# endif
 
-#define PRINT_FIELD_D(prefix_, where_, field_)                         \
+# define PRINT_FIELD_D(prefix_, where_, field_)                                \
        STRACE_PRINTF("%s%s=%lld", (prefix_), #field_,                  \
                      sign_extend_unsigned_to_ll((where_).field_))
 
-#define PRINT_FIELD_U(prefix_, where_, field_)                         \
+# define PRINT_FIELD_U(prefix_, where_, field_)                                \
        STRACE_PRINTF("%s%s=%llu", (prefix_), #field_,                  \
                      zero_extend_signed_to_ull((where_).field_))
 
-#define PRINT_FIELD_U_CAST(prefix_, where_, field_, type_)             \
+# define PRINT_FIELD_U_CAST(prefix_, where_, field_, type_)            \
        STRACE_PRINTF("%s%s=%llu", (prefix_), #field_,                  \
                      zero_extend_signed_to_ull((type_) (where_).field_))
 
-#define PRINT_FIELD_X(prefix_, where_, field_)                         \
+# define PRINT_FIELD_X(prefix_, where_, field_)                                \
        STRACE_PRINTF("%s%s=%#llx", (prefix_), #field_,                 \
                      zero_extend_signed_to_ull((where_).field_))
 
-#define PRINT_FIELD_ADDR(prefix_, where_, field_)                      \
+# define PRINT_FIELD_ADDR(prefix_, where_, field_)                     \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printaddr((where_).field_);                             \
        } while (0)
 
-#define PRINT_FIELD_ADDR64(prefix_, where_, field_)                    \
+# define PRINT_FIELD_ADDR64(prefix_, where_, field_)                   \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printaddr64((where_).field_);                           \
        } while (0)
 
-#define PRINT_FIELD_0X(prefix_, where_, field_)                                \
+# define PRINT_FIELD_0X(prefix_, where_, field_)                               \
        STRACE_PRINTF("%s%s=%#0*llx", (prefix_), #field_,               \
                      (int) sizeof((where_).field_) * 2,                \
                      zero_extend_signed_to_ull((where_).field_))
 
-#define PRINT_FIELD_COOKIE(prefix_, where_, field_)                    \
+# define PRINT_FIELD_COOKIE(prefix_, where_, field_)                   \
        STRACE_PRINTF("%s%s=[%llu, %llu]", (prefix_), #field_,          \
                      zero_extend_signed_to_ull((where_).field_[0]),    \
                      zero_extend_signed_to_ull((where_).field_[1]))
 
-#define PRINT_FIELD_FLAGS(prefix_, where_, field_, xlat_, dflt_)       \
+# define PRINT_FIELD_FLAGS(prefix_, where_, field_, xlat_, dflt_)      \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printflags64((xlat_),                                   \
@@ -63,7 +63,7 @@
                             (dflt_));                                  \
        } while (0)
 
-#define PRINT_FIELD_XVAL(prefix_, where_, field_, xlat_, dflt_)                \
+# define PRINT_FIELD_XVAL(prefix_, where_, field_, xlat_, dflt_)               \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printxval64((xlat_),                                    \
@@ -71,7 +71,7 @@
                            (dflt_));           \
        } while (0)
 
-#define PRINT_FIELD_XVAL_U(prefix_, where_, field_, xlat_, dflt_)      \
+# define PRINT_FIELD_XVAL_U(prefix_, where_, field_, xlat_, dflt_)     \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printxvals_ex(zero_extend_signed_to_ull((where_).field_), \
@@ -79,7 +79,7 @@
                              (xlat_), NULL);                           \
        } while (0)
 
-#define PRINT_FIELD_XVAL_SORTED_SIZED(prefix_, where_, field_, xlat_,  \
+# define PRINT_FIELD_XVAL_SORTED_SIZED(prefix_, where_, field_, xlat_, \
                                      xlat_size_, dflt_)                \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
@@ -88,7 +88,7 @@
                                  (dflt_));                             \
        } while (0)
 
-#define PRINT_FIELD_XVAL_INDEX(prefix_, where_, field_, xlat_, dflt_)  \
+# define PRINT_FIELD_XVAL_INDEX(prefix_, where_, field_, xlat_, dflt_) \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printxval_index((xlat_),                                \
  * Generic "ID" printing. ID is considered unsigned except for the special value
  * of -1.
  */
-#define PRINT_FIELD_ID(prefix_, where_, field_)                                        \
+# define PRINT_FIELD_ID(prefix_, where_, field_)                                       \
        do {                                                                            \
                if (sign_extend_unsigned_to_ll((where_).field_) == -1LL)                \
                        STRACE_PRINTF("%s%s=-1", (prefix_), #field_);                   \
                                      zero_extend_signed_to_ull((where_).field_));      \
        } while (0)
 
-#define PRINT_FIELD_UID PRINT_FIELD_ID
+# define PRINT_FIELD_UID PRINT_FIELD_ID
 
-#define PRINT_FIELD_U64(prefix_, where_, field_)                                       \
+# define PRINT_FIELD_U64(prefix_, where_, field_)                                      \
        do {                                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);                             \
                if (zero_extend_signed_to_ull((where_).field_) == UINT64_MAX)           \
                                      zero_extend_signed_to_ull((where_).field_));      \
        } while (0)
 
-#define PRINT_FIELD_STRING(prefix_, where_, field_, len_, style_)      \
+# define PRINT_FIELD_STRING(prefix_, where_, field_, len_, style_)     \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_quoted_string((const char *)(where_).field_,      \
                                    (len_), (style_));                  \
        } while (0)
 
-#define PRINT_FIELD_CSTRING(prefix_, where_, field_)                   \
+# define PRINT_FIELD_CSTRING(prefix_, where_, field_)                  \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_quoted_cstring((const char *) (where_).field_,    \
                                        MUST_BE_ARRAY((where_).field_)); \
        } while (0)
 
-#define PRINT_FIELD_CSTRING_SZ(prefix_, where_, field_, size_)         \
+# define PRINT_FIELD_CSTRING_SZ(prefix_, where_, field_, size_)                \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_quoted_cstring((const char *) (where_).field_,    \
                                     (size_));                          \
        } while (0)
 
-#define PRINT_FIELD_HEX_ARRAY(prefix_, where_, field_)                 \
+# define PRINT_FIELD_HEX_ARRAY(prefix_, where_, field_)                        \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_quoted_string((const char *)(where_).field_,      \
                                    QUOTE_FORCE_HEX); \
        } while (0)
 
-#define PRINT_FIELD_INET_ADDR(prefix_, where_, field_, af_)            \
+# define PRINT_FIELD_INET_ADDR(prefix_, where_, field_, af_)           \
        do {                                                            \
                STRACE_PRINTF(prefix_);                                 \
                print_inet_addr((af_), &(where_).field_,                \
                                sizeof((where_).field_), #field_);      \
        } while (0)
 
-#define PRINT_FIELD_INET4_ADDR(prefix_, where_, field_)                        \
+# define PRINT_FIELD_INET4_ADDR(prefix_, where_, field_)                       \
        STRACE_PRINTF("%s%s=inet_addr(\"%s\")", (prefix_), #field_,     \
                      inet_ntoa((where_).field_))
 
-#define PRINT_FIELD_AX25_ADDR(prefix_, where_, field_)                 \
+# define PRINT_FIELD_AX25_ADDR(prefix_, where_, field_)                        \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_ax25_addr(&(where_).field_);                      \
        } while (0)
 
-#define PRINT_FIELD_X25_ADDR(prefix_, where_, field_)                  \
+# define PRINT_FIELD_X25_ADDR(prefix_, where_, field_)                 \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_x25_addr(&(where_).field_);                       \
        } while (0)
 
-#define PRINT_FIELD_NET_PORT(prefix_, where_, field_)                  \
+# define PRINT_FIELD_NET_PORT(prefix_, where_, field_)                 \
        STRACE_PRINTF("%s%s=htons(%u)", (prefix_), #field_,             \
                      ntohs((where_).field_))
 
-#define PRINT_FIELD_IFINDEX(prefix_, where_, field_)                   \
+# define PRINT_FIELD_IFINDEX(prefix_, where_, field_)                  \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_ifindex((where_).field_);                         \
        } while (0)
 
-#define PRINT_FIELD_SOCKADDR(prefix_, where_, field_)                  \
+# define PRINT_FIELD_SOCKADDR(prefix_, where_, field_)                 \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_sockaddr(&(where_).field_,                        \
                               sizeof((where_).field_));                \
        } while (0)
 
-#define PRINT_FIELD_DEV(prefix_, where_, field_)                       \
+# define PRINT_FIELD_DEV(prefix_, where_, field_)                      \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                print_dev_t((where_).field_);                           \
        } while (0)
 
-#define PRINT_FIELD_PTR(prefix_, where_, field_)                       \
+# define PRINT_FIELD_PTR(prefix_, where_, field_)                      \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printaddr((mpers_ptr_t) (where_).field_);               \
        } while (0)
 
-#define PRINT_FIELD_FD(prefix_, where_, field_, tcp_)                  \
+# define PRINT_FIELD_FD(prefix_, where_, field_, tcp_)                 \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printfd((tcp_), (where_).field_);                       \
        } while (0)
 
-#define PRINT_FIELD_STRN(prefix_, where_, field_, len_, tcp_)          \
+# define PRINT_FIELD_STRN(prefix_, where_, field_, len_, tcp_)         \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printstrn((tcp_), (where_).field_, (len_));             \
        } while (0)
 
 
-#define PRINT_FIELD_STR(prefix_, where_, field_, tcp_)                 \
+# define PRINT_FIELD_STR(prefix_, where_, field_, tcp_)                        \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printstr((tcp_), (where_).field_);                      \
        } while (0)
 
-#define PRINT_FIELD_PATH(prefix_, where_, field_, tcp_)                        \
+# define PRINT_FIELD_PATH(prefix_, where_, field_, tcp_)                       \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                printpath((tcp_), (where_).field_);                     \
        } while (0)
 
-#define PRINT_FIELD_MAC(prefix_, where_, field_)                       \
+# define PRINT_FIELD_MAC(prefix_, where_, field_)                      \
        PRINT_FIELD_MAC_SZ((prefix_), (where_), field_,                 \
                           ARRAY_SIZE((where_).field_))
 
-#define PRINT_FIELD_MAC_SZ(prefix_, where_, field_, size_)             \
+# define PRINT_FIELD_MAC_SZ(prefix_, where_, field_, size_)            \
        do {                                                            \
                static_assert(sizeof(((where_).field_)[0]) == 1,        \
                              "MAC address is not a byte array");       \
index 53e3592480e795a27aaa20ef5b8580d0cc00f7f0..dd567f2ffa9dce6474abca1298b3928f8d863141 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifdef HAVE_SCSI_SG_H
 
-#include DEF_MPERS_TYPE(struct_sg_req_info)
+# include DEF_MPERS_TYPE(struct_sg_req_info)
 
 # include <scsi/sg.h>
 
index 5f30c76292205efdaab2f73ea8a8f93fad256277..9cfc4c63e10545c12fe8596fc43f06ab037031d2 100644 (file)
@@ -25,7 +25,7 @@
 #include "nr_prefix.c"
 
 #ifndef IN_MPERS
-#include "printsiginfo.h"
+# include "printsiginfo.h"
 #endif
 
 #include "xlat/audit_arch.h"
index 7c726790fa22fd53d5b67d78f87fab1b1bc1c363..4088cb5408e06d1d03ee1bd53c7169a182d05872 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_PRINTSIGINFO_H
-#define STRACE_PRINTSIGINFO_H
+# define STRACE_PRINTSIGINFO_H
 
 extern void printsiginfo(const siginfo_t *);
 
index 3e57295d54d487874d651d7a32620030f82120bc..d224c396d4b400f831b973891d2601a52e9ce1b7 100644 (file)
--- a/process.c
+++ b/process.c
@@ -138,25 +138,25 @@ SYS_FUNC(ptrace)
                        printaddr(addr);
                }
 
-# if defined IA64 || defined SPARC || defined SPARC64
+#if defined IA64 || defined SPARC || defined SPARC64
                switch (request) {
-#  ifdef IA64
+# ifdef IA64
                case PTRACE_PEEKDATA:
                case PTRACE_PEEKTEXT:
                case PTRACE_PEEKUSER:
                        /* data is ignored */
                        return RVAL_DECODED | RVAL_HEX;
-#  endif /* IA64 */
-#  if defined SPARC || defined SPARC64
+# endif /* IA64 */
+# if defined SPARC || defined SPARC64
                case PTRACE_GETREGS:
                case PTRACE_SETREGS:
                case PTRACE_GETFPREGS:
                case PTRACE_SETFPREGS:
                        /* data is ignored */
                        return RVAL_DECODED;
-#  endif /* SPARC || SPARC64 */
+# endif /* SPARC || SPARC64 */
                }
-# endif /* IA64 || SPARC || SPARC64 */
+#endif /* IA64 || SPARC || SPARC64 */
 
                tprints(", ");
 
index 89d4b95dc1381aab4164c80582816b4f6631f35a..e4a5851dfd927406b92e5ebeaa9c2d45b3415da0 100644 (file)
--- a/ptrace.h
+++ b/ptrace.h
  */
 
 #ifndef STRACE_PTRACE_H
-#define STRACE_PTRACE_H
+# define STRACE_PTRACE_H
 
-#include <stdint.h>
-#include <sys/ptrace.h>
+# include <stdint.h>
+# include <sys/ptrace.h>
 
-#ifdef HAVE_STRUCT_IA64_FPREG
-# define ia64_fpreg XXX_ia64_fpreg
-#endif
-#ifdef HAVE_STRUCT_PT_ALL_USER_REGS
-# define pt_all_user_regs XXX_pt_all_user_regs
-#endif
-#ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
-#endif
+# ifdef HAVE_STRUCT_IA64_FPREG
+#  define ia64_fpreg XXX_ia64_fpreg
+# endif
+# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
+#  define pt_all_user_regs XXX_pt_all_user_regs
+# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+#  define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+# endif
 
-#include <linux/ptrace.h>
+# include <linux/ptrace.h>
 
-#ifdef HAVE_STRUCT_IA64_FPREG
-# undef ia64_fpreg
-#endif
-#ifdef HAVE_STRUCT_PT_ALL_USER_REGS
-# undef pt_all_user_regs
-#endif
-#ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-# undef ptrace_peeksiginfo_args
-#endif
+# ifdef HAVE_STRUCT_IA64_FPREG
+#  undef ia64_fpreg
+# endif
+# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
+#  undef pt_all_user_regs
+# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+#  undef ptrace_peeksiginfo_args
+# endif
 
-#if defined(SPARC) || defined(SPARC64)
+# if defined(SPARC) || defined(SPARC64)
 /*
  * SPARC has a different PTRACE_DETACH value correctly defined in sys/ptrace.h,
  * but linux/ptrace.h clobbers it with the standard one.  PTRACE_SUNDETACH is
  * also defined to the correct value by sys/ptrace.h, so use that instead.
  */
-# undef PTRACE_DETACH
-# define PTRACE_DETACH PTRACE_SUNDETACH
-#endif
+#  undef PTRACE_DETACH
+#  define PTRACE_DETACH PTRACE_SUNDETACH
+# endif
 
-#ifndef PTRACE_EVENT_FORK
-# define PTRACE_EVENT_FORK     1
-#endif
-#ifndef PTRACE_EVENT_VFORK
-# define PTRACE_EVENT_VFORK    2
-#endif
-#ifndef PTRACE_EVENT_CLONE
-# define PTRACE_EVENT_CLONE    3
-#endif
-#ifndef PTRACE_EVENT_EXEC
-# define PTRACE_EVENT_EXEC     4
-#endif
-#ifndef PTRACE_EVENT_VFORK_DONE
-# define PTRACE_EVENT_VFORK_DONE       5
-#endif
-#ifndef PTRACE_EVENT_EXIT
-# define PTRACE_EVENT_EXIT     6
-#endif
-#ifndef PTRACE_EVENT_SECCOMP
-# define PTRACE_EVENT_SECCOMP  7
-#endif
-#ifdef PTRACE_EVENT_STOP
+# ifndef PTRACE_EVENT_FORK
+#  define PTRACE_EVENT_FORK    1
+# endif
+# ifndef PTRACE_EVENT_VFORK
+#  define PTRACE_EVENT_VFORK   2
+# endif
+# ifndef PTRACE_EVENT_CLONE
+#  define PTRACE_EVENT_CLONE   3
+# endif
+# ifndef PTRACE_EVENT_EXEC
+#  define PTRACE_EVENT_EXEC    4
+# endif
+# ifndef PTRACE_EVENT_VFORK_DONE
+#  define PTRACE_EVENT_VFORK_DONE      5
+# endif
+# ifndef PTRACE_EVENT_EXIT
+#  define PTRACE_EVENT_EXIT    6
+# endif
+# ifndef PTRACE_EVENT_SECCOMP
+#  define PTRACE_EVENT_SECCOMP 7
+# endif
+# ifdef PTRACE_EVENT_STOP
 /* Linux 3.1 - 3.3 releases had a broken value.  It was fixed in 3.4.  */
-# if PTRACE_EVENT_STOP == 7
-#  undef PTRACE_EVENT_STOP
+#  if PTRACE_EVENT_STOP == 7
+#   undef PTRACE_EVENT_STOP
+#  endif
+# endif
+# ifndef PTRACE_EVENT_STOP
+#  define PTRACE_EVENT_STOP    128
 # endif
-#endif
-#ifndef PTRACE_EVENT_STOP
-# define PTRACE_EVENT_STOP     128
-#endif
 
-#ifndef PTRACE_O_TRACESYSGOOD
-# define PTRACE_O_TRACESYSGOOD 1
-#endif
-#ifndef PTRACE_O_TRACEFORK
-# define PTRACE_O_TRACEFORK    (1 << PTRACE_EVENT_FORK)
-#endif
-#ifndef PTRACE_O_TRACEVFORK
-# define PTRACE_O_TRACEVFORK   (1 << PTRACE_EVENT_VFORK)
-#endif
-#ifndef PTRACE_O_TRACECLONE
-# define PTRACE_O_TRACECLONE   (1 << PTRACE_EVENT_CLONE)
-#endif
-#ifndef PTRACE_O_TRACEEXEC
-# define PTRACE_O_TRACEEXEC    (1 << PTRACE_EVENT_EXEC)
-#endif
-#ifndef PTRACE_O_TRACEVFORKDONE
-# define PTRACE_O_TRACEVFORKDONE       (1 << PTRACE_EVENT_VFORK_DONE)
-#endif
-#ifndef PTRACE_O_TRACEEXIT
-# define PTRACE_O_TRACEEXIT    (1 << PTRACE_EVENT_EXIT)
-#endif
-#ifndef PTRACE_O_TRACESECCOMP
-# define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP)
-#endif
-#ifndef PTRACE_O_EXITKILL
-# define PTRACE_O_EXITKILL     (1 << 20)
-#endif
-#ifndef PTRACE_O_SUSPEND_SECCOMP
-# define PTRACE_O_SUSPEND_SECCOMP      (1 << 21)
-#endif
+# ifndef PTRACE_O_TRACESYSGOOD
+#  define PTRACE_O_TRACESYSGOOD        1
+# endif
+# ifndef PTRACE_O_TRACEFORK
+#  define PTRACE_O_TRACEFORK   (1 << PTRACE_EVENT_FORK)
+# endif
+# ifndef PTRACE_O_TRACEVFORK
+#  define PTRACE_O_TRACEVFORK  (1 << PTRACE_EVENT_VFORK)
+# endif
+# ifndef PTRACE_O_TRACECLONE
+#  define PTRACE_O_TRACECLONE  (1 << PTRACE_EVENT_CLONE)
+# endif
+# ifndef PTRACE_O_TRACEEXEC
+#  define PTRACE_O_TRACEEXEC   (1 << PTRACE_EVENT_EXEC)
+# endif
+# ifndef PTRACE_O_TRACEVFORKDONE
+#  define PTRACE_O_TRACEVFORKDONE      (1 << PTRACE_EVENT_VFORK_DONE)
+# endif
+# ifndef PTRACE_O_TRACEEXIT
+#  define PTRACE_O_TRACEEXIT   (1 << PTRACE_EVENT_EXIT)
+# endif
+# ifndef PTRACE_O_TRACESECCOMP
+#  define PTRACE_O_TRACESECCOMP        (1 << PTRACE_EVENT_SECCOMP)
+# endif
+# ifndef PTRACE_O_EXITKILL
+#  define PTRACE_O_EXITKILL    (1 << 20)
+# endif
+# ifndef PTRACE_O_SUSPEND_SECCOMP
+#  define PTRACE_O_SUSPEND_SECCOMP     (1 << 21)
+# endif
 
-#ifndef PTRACE_SETOPTIONS
-# define PTRACE_SETOPTIONS     0x4200
-#endif
-#ifndef PTRACE_GETEVENTMSG
-# define PTRACE_GETEVENTMSG    0x4201
-#endif
-#ifndef PTRACE_GETSIGINFO
-# define PTRACE_GETSIGINFO     0x4202
-#endif
-#ifndef PTRACE_SETSIGINFO
-# define PTRACE_SETSIGINFO     0x4203
-#endif
-#ifndef PTRACE_GETREGSET
-# define PTRACE_GETREGSET      0x4204
-#endif
-#ifndef PTRACE_SETREGSET
-# define PTRACE_SETREGSET      0x4205
-#endif
-#ifndef PTRACE_SEIZE
-# define PTRACE_SEIZE          0x4206
-#endif
-#ifndef PTRACE_INTERRUPT
-# define PTRACE_INTERRUPT      0x4207
-#endif
-#ifndef PTRACE_LISTEN
-# define PTRACE_LISTEN         0x4208
-#endif
-#ifndef PTRACE_PEEKSIGINFO
-# define PTRACE_PEEKSIGINFO    0x4209
-#endif
-#ifndef PTRACE_GETSIGMASK
-# define PTRACE_GETSIGMASK     0x420a
-#endif
-#ifndef PTRACE_SETSIGMASK
-# define PTRACE_SETSIGMASK     0x420b
-#endif
-#ifndef PTRACE_SECCOMP_GET_FILTER
-# define PTRACE_SECCOMP_GET_FILTER     0x420c
-#endif
-#ifndef PTRACE_SECCOMP_GET_METADATA
-# define PTRACE_SECCOMP_GET_METADATA   0x420d
-#endif
-#ifndef PTRACE_GET_SYSCALL_INFO
-# define PTRACE_GET_SYSCALL_INFO       0x420e
-# define PTRACE_SYSCALL_INFO_NONE      0
-# define PTRACE_SYSCALL_INFO_ENTRY     1
-# define PTRACE_SYSCALL_INFO_EXIT      2
-# define PTRACE_SYSCALL_INFO_SECCOMP   3
+# ifndef PTRACE_SETOPTIONS
+#  define PTRACE_SETOPTIONS    0x4200
+# endif
+# ifndef PTRACE_GETEVENTMSG
+#  define PTRACE_GETEVENTMSG   0x4201
+# endif
+# ifndef PTRACE_GETSIGINFO
+#  define PTRACE_GETSIGINFO    0x4202
+# endif
+# ifndef PTRACE_SETSIGINFO
+#  define PTRACE_SETSIGINFO    0x4203
+# endif
+# ifndef PTRACE_GETREGSET
+#  define PTRACE_GETREGSET     0x4204
+# endif
+# ifndef PTRACE_SETREGSET
+#  define PTRACE_SETREGSET     0x4205
+# endif
+# ifndef PTRACE_SEIZE
+#  define PTRACE_SEIZE         0x4206
+# endif
+# ifndef PTRACE_INTERRUPT
+#  define PTRACE_INTERRUPT     0x4207
+# endif
+# ifndef PTRACE_LISTEN
+#  define PTRACE_LISTEN                0x4208
+# endif
+# ifndef PTRACE_PEEKSIGINFO
+#  define PTRACE_PEEKSIGINFO   0x4209
+# endif
+# ifndef PTRACE_GETSIGMASK
+#  define PTRACE_GETSIGMASK    0x420a
+# endif
+# ifndef PTRACE_SETSIGMASK
+#  define PTRACE_SETSIGMASK    0x420b
+# endif
+# ifndef PTRACE_SECCOMP_GET_FILTER
+#  define PTRACE_SECCOMP_GET_FILTER    0x420c
+# endif
+# ifndef PTRACE_SECCOMP_GET_METADATA
+#  define PTRACE_SECCOMP_GET_METADATA  0x420d
+# endif
+# ifndef PTRACE_GET_SYSCALL_INFO
+#  define PTRACE_GET_SYSCALL_INFO      0x420e
+#  define PTRACE_SYSCALL_INFO_NONE     0
+#  define PTRACE_SYSCALL_INFO_ENTRY    1
+#  define PTRACE_SYSCALL_INFO_EXIT     2
+#  define PTRACE_SYSCALL_INFO_SECCOMP  3
 struct ptrace_syscall_info {
        uint8_t op;
        uint8_t pad[3];
@@ -184,13 +184,13 @@ struct ptrace_syscall_info {
                } seccomp;
        };
 };
-#endif
+# endif
 
-#if !HAVE_DECL_PTRACE_PEEKUSER
-# define PTRACE_PEEKUSER PTRACE_PEEKUSR
-#endif
-#if !HAVE_DECL_PTRACE_POKEUSER
-# define PTRACE_POKEUSER PTRACE_POKEUSR
-#endif
+# if !HAVE_DECL_PTRACE_PEEKUSER
+#  define PTRACE_PEEKUSER PTRACE_PEEKUSR
+# endif
+# if !HAVE_DECL_PTRACE_POKEUSER
+#  define PTRACE_POKEUSER PTRACE_POKEUSR
+# endif
 
 #endif /* !STRACE_PTRACE_H */
index 3bbafc28fe554188e9f45407df0aff28f20743ef..b70e5c6d7d3775ab40934d9841a913139885ec15 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_PTRACE_SYSCALL_INFO_H
-#define STRACE_PTRACE_SYSCALL_INFO_H
+# define STRACE_PTRACE_SYSCALL_INFO_H
 
 extern bool ptrace_get_syscall_info_supported;
 extern bool test_ptrace_get_syscall_info(void);
index 0bced68aec34862b48e8d3a6d6fe177f46e55a63..36612b2fcfb35bf984af400b8f343f67a331155a 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/random.h>
 
 #define XLAT_MACROS_ONLY
-# include "xlat/random_ioctl_cmds.h"
+#include "xlat/random_ioctl_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 /*
diff --git a/regs.h b/regs.h
index bdcb72fefa936c0315fed9de35f6f94e6e563f20..29d8a9cecdbce3b8ce7240490744e2ee127305cf 100644 (file)
--- a/regs.h
+++ b/regs.h
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_REGS_H
-#define STRACE_REGS_H
+# define STRACE_REGS_H
 
-#include <sys/user.h>
-#include "arch_regs.h"
+# include <sys/user.h>
+# include "arch_regs.h"
 
 #endif /* !STRACE_REGS_H */
index b9bdfa9236a4d9ad499e1441e6d77d616e6961ac..c7a187e3dee54c5659e13ffdf56d967eee49130f 100644 (file)
--- a/retval.h
+++ b/retval.h
@@ -7,7 +7,7 @@
 
 /* retval to index and visa versa.  */
 #ifndef STRACE_RETVAL_H
-#define STRACE_RETVAL_H
+# define STRACE_RETVAL_H
 
 uint16_t retval_new(kernel_long_t rval);
 kernel_long_t retval_get(uint16_t rval_idx);
index 6ee4a612f05894c7cac38038cf3d40910546f9dd..32f47951f8cf4f548aa87f8221abb5f7de64f1db 100644 (file)
@@ -10,8 +10,8 @@
 #include "ptrace.h"
 #include "regs.h"
 
-#define        DEF_FUNC_GET_RT_SIGFRAME_ADDR   \
+#define DEF_FUNC_GET_RT_SIGFRAME_ADDR  \
                kernel_ulong_t get_rt_sigframe_addr(struct tcb *tcp)
-#define        FUNC_GET_RT_SIGFRAME_ADDR       DEF_FUNC_GET_RT_SIGFRAME_ADDR
+#define FUNC_GET_RT_SIGFRAME_ADDR      DEF_FUNC_GET_RT_SIGFRAME_ADDR
 
 #include "arch_rt_sigframe.c"
index f0e83fe7b2d19c947a7e52255df44d0920e95c53..92bc1e03c07cdb34ef0fcc165101bdd19b835c1b 100644 (file)
@@ -463,10 +463,10 @@ decode_rtnl_link_stats64(struct tcb *const tcp,
 
                PRINT_FIELD_U(", ", st, rx_compressed);
                PRINT_FIELD_U(", ", st, tx_compressed);
-#ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
+# ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
                if (len >= def_size)
                        PRINT_FIELD_U(", ", st, rx_nohandler);
-#endif
+# endif
                tprints("}");
        }
 
index a4c4cc802c02e59d1ab90eb326359b2f5f3f3dc4..f9f5756b6f1e71f171a55fbecda30d0640c8113d 100644 (file)
@@ -114,10 +114,10 @@ decode_ndt_stats(struct tcb *const tcp,
                PRINT_FIELD_U(", ", ndtst, ndts_rcv_probes_ucast);
                PRINT_FIELD_U(", ", ndtst, ndts_periodic_gc_runs);
                PRINT_FIELD_U(", ", ndtst, ndts_forced_gc_runs);
-#ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
+# ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
                if (len >= def_size)
                        PRINT_FIELD_U(", ", ndtst, ndts_table_fulls);
-#endif
+# endif
                tprints("}");
        }
 
diff --git a/s390.c b/s390.c
index 7c20bdc3345fdcd705a36630feaf4f866002628a..a650b23f92ceacfbfdcde72158d04435fac332f0 100644 (file)
--- a/s390.c
+++ b/s390.c
 
 #if defined S390 || defined S390X
 
-#include <sys/user.h>
+# include <sys/user.h>
 
-#include "print_fields.h"
+# include "print_fields.h"
 
-#include "xlat/s390_guarded_storage_commands.h"
-#include "xlat/s390_runtime_instr_commands.h"
-#include "xlat/s390_sthyi_function_codes.h"
+# include "xlat/s390_guarded_storage_commands.h"
+# include "xlat/s390_runtime_instr_commands.h"
+# include "xlat/s390_sthyi_function_codes.h"
 
 /*
  * Since, for some reason, kernel doesn't expose all these nice constants and
@@ -401,10 +401,10 @@ decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
                *ascii++ = conv_table[(unsigned char) *ebcdic++];
 }
 
-#define DECODE_EBCDIC(ebcdic_, ascii_) \
+# define DECODE_EBCDIC(ebcdic_, ascii_) \
        decode_ebcdic((ebcdic_), (ascii_), \
                      sizeof(ebcdic_) + MUST_BE_ARRAY(ebcdic_))
-#define PRINT_EBCDIC(ebcdic_) \
+# define PRINT_EBCDIC(ebcdic_) \
        do { \
                char ascii_str[sizeof(ebcdic_) + MUST_BE_ARRAY(ebcdic_)]; \
                \
@@ -413,13 +413,13 @@ decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
                                    QUOTE_EMIT_COMMENT); \
        } while (0)
 
-#define PRINT_FIELD_EBCDIC(prefix_, where_, field_) \
+# define PRINT_FIELD_EBCDIC(prefix_, where_, field_) \
        do { \
                PRINT_FIELD_HEX_ARRAY(prefix_, where_, field_); \
                PRINT_EBCDIC((where_).field_); \
        } while (0)
 
-#define PRINT_FIELD_WEIGHT(prefix_, where_, field_) \
+# define PRINT_FIELD_WEIGHT(prefix_, where_, field_) \
        do { \
                PRINT_FIELD_X(prefix_, where_, field_); \
                if ((where_).field_) \
@@ -431,10 +431,10 @@ decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
        } while (0)
 
 
-#define IS_BLANK(arr_) /* 0x40 is space in EBCDIC */ \
+# define IS_BLANK(arr_) /* 0x40 is space in EBCDIC */ \
        is_filled(arr_, '\x40', sizeof(arr_) + MUST_BE_ARRAY(arr_))
 
-#define CHECK_SIZE(hdr_, size_, name_, ...) \
+# define CHECK_SIZE(hdr_, size_, name_, ...) \
        do { \
                if ((size_) < sizeof(*(hdr_))) { \
                        tprintf_comment("Invalid " name_ " with size " \
@@ -448,7 +448,7 @@ decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
                } \
        } while (0)
 
-#define PRINT_UNKNOWN_TAIL(hdr_, size_) \
+# define PRINT_UNKNOWN_TAIL(hdr_, size_) \
        do { \
                if ((size_) > sizeof(*(hdr_)) && \
                    !is_filled((char *) ((hdr_) + 1), '\0', \
@@ -842,7 +842,7 @@ print_sthyi_guest(struct tcb *tcp, struct sthyi_guest *hdr, uint16_t size,
        tprints("}");
 }
 
-#define STHYI_PRINT_STRUCT(l_, name_) \
+# define STHYI_PRINT_STRUCT(l_, name_) \
        do { \
                if (hdr->inf ##l_## off && hdr->inf ##l_## off + \
                    hdr->inf ##l_## len <= sizeof(data)) { \
@@ -853,7 +853,7 @@ print_sthyi_guest(struct tcb *tcp, struct sthyi_guest *hdr, uint16_t size,
                } \
        } while (0)
 
-#define STHYI_PRINT_HV_STRUCT(l_, n_, name_) \
+# define STHYI_PRINT_HV_STRUCT(l_, n_, name_) \
        do { \
                if (hdr->inf ##l_## off ##n_ && hdr->inf ##l_## off ##n_ + \
                    hdr->inf ##l_## len ##n_ <= sizeof(data)) { \
index c22c9656f01fad9a0f6bd381f791d98e5ac432d5..c305ccfb65a0d3453b15d4e88894cc8b7a92ad24 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_SCHED_ATTR_H
-#define STRACE_SCHED_ATTR_H
+# define STRACE_SCHED_ATTR_H
 
 # include <stdint.h>
 
index bfe04afd2f73550a9659f445fe73666f2f4f6e6d..7656c6ffa7dfbf1695c7d43d264e87a856b36bb4 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifdef HAVE_SCSI_SG_H
 
-#include DEF_MPERS_TYPE(struct_sg_io_hdr)
+# include DEF_MPERS_TYPE(struct_sg_io_hdr)
 
 # include <scsi/sg.h>
 
@@ -40,7 +40,7 @@ print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr,
        }
 }
 
-#define PRINT_FIELD_SG_IO_BUFFER(prefix_, where_, field_, size_, count_, tcp_) \
+# define PRINT_FIELD_SG_IO_BUFFER(prefix_, where_, field_, size_, count_, tcp_)        \
        do {                                                                    \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);                     \
                print_sg_io_buffer((tcp_), (mpers_ptr_t)((where_).field_),      \
index 44635a4523b62f8ecd90457ae8efeba7d65fcbd8..df73ed609b238acb41611ca23c0a01c227b7f305 100644 (file)
@@ -28,7 +28,7 @@ print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr,
        }
 }
 
-#define PRINT_FIELD_SG_IO_BUFFER(prefix_, where_, field_, size_, count_, tcp_) \
+# define PRINT_FIELD_SG_IO_BUFFER(prefix_, where_, field_, size_, count_, tcp_)        \
        do {                                                                    \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);                     \
                print_sg_io_buffer((tcp_), (where_).field_, (size_), (count_)); \
index 475582f8c48a6d1e3287e93ce53a5408a55b786f..c2228a96bd7466e7d3781ca784e370198afafed5 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_SIGEVENT_H
-#define STRACE_SIGEVENT_H
+# define STRACE_SIGEVENT_H
 
 typedef struct {
        union {
index 660790be1ff0a0ad16b728a3861f9240a1be7797..418905f0f3c51e5a803fed3dfbc4254baf2a2d60 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -538,9 +538,9 @@ decode_new_sigaction(struct tcb *const tcp, const kernel_ulong_t addr)
                memset(&sa, 0, sizeof(sa));
                sa.sa_handler__ = sa32.sa_handler__;
                sa.sa_flags     = sa32.sa_flags;
-#if HAVE_SA_RESTORER && defined SA_RESTORER
+# if HAVE_SA_RESTORER && defined SA_RESTORER
                sa.sa_restorer  = sa32.sa_restorer;
-#endif
+# endif
                /* Kernel treats sa_mask as an array of longs.
                 * For 32-bit process, "long" is uint32_t, thus, for example,
                 * 32th bit in sa_mask will end up as bit 0 in sa_mask[1].
diff --git a/sock.c b/sock.c
index 6d5d5b3afd5b0fa115e6ca5e2467d751c0c5292f..a0152bddd4f5191a80c6b7054f7a86b9f1c0725a 100644 (file)
--- a/sock.c
+++ b/sock.c
@@ -28,7 +28,7 @@ typedef struct ifreq struct_ifreq;
 #include "xlat/iffflags.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/arp_hardware_types.h"
+#include "xlat/arp_hardware_types.h"
 #undef XLAT_MACROS_ONLY
 
 static void
index a981925bb2f0863911c36d9ab79c67c5b5ed8b1f..d6191187768bded2356a55571f688b67b76fbf92 100644 (file)
@@ -27,7 +27,7 @@
 #include "xstring.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/inet_protocols.h"
+#include "xlat/inet_protocols.h"
 #undef XLAT_MACROS_ONLY
 
 typedef struct {
index 23ba8d12a44919d26adfb5ed4bf1dda9d75a0e10..c18e76607a3e2a7760bd33fdd67fcb2d0f261036 100644 (file)
@@ -9,9 +9,9 @@
 
 #ifdef BFIN
 
-#include <bfin_sram.h>
+# include <bfin_sram.h>
 
-#include "xlat/sram_alloc_flags.h"
+# include "xlat/sram_alloc_flags.h"
 
 SYS_FUNC(sram_alloc)
 {
diff --git a/stat.h b/stat.h
index 07502871241c706e045ed76feadd45a5b0a9df8b..bc1ba90ee1927e3e93a4f007c0ee68864ef3f079 100644 (file)
--- a/stat.h
+++ b/stat.h
@@ -7,7 +7,7 @@
  */
 
 #ifndef STRACE_STAT_H
-#define STRACE_STAT_H
+# define STRACE_STAT_H
 
 struct strace_stat {
        unsigned long long      dev;
index 3bd456ac08e891e766b80ea3953996a839073621..d2ac192cf460f321038ed7f3db75554edfe721de 100644 (file)
--- a/statfs.h
+++ b/statfs.h
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_STATFS_H
-#define STRACE_STATFS_H
+# define STRACE_STATFS_H
 
 struct strace_statfs {
        unsigned long long f_type;
old mode 100755 (executable)
new mode 100644 (file)
index ebad6d7..0bcfa80
@@ -6,24 +6,24 @@
  */
 
 #ifndef STRACE_STATIC_ASSERT_H
-#define STRACE_STATIC_ASSERT_H
+# define STRACE_STATIC_ASSERT_H
 
-#include "assert.h"
+# include "assert.h"
 
-#if defined HAVE_STATIC_ASSERT
+# if defined HAVE_STATIC_ASSERT
 
 /* static_assert is already available */
 
-#elif defined HAVE__STATIC_ASSERT
+# elif defined HAVE__STATIC_ASSERT
 
-# undef static_assert
-# define static_assert _Static_assert
+#  undef static_assert
+#  define static_assert _Static_assert
 
-#else /* !HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT */
+# else /* !HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT */
 
-# define static_assert(expr, message) \
+#  define static_assert(expr, message) \
        extern int (*strace_static_assert(int))[sizeof(int[2 * !!(expr) - 1])]
 
-#endif
+# endif
 
 #endif /* !STRACE_STATIC_ASSERT_H */
diff --git a/statx.h b/statx.h
index f9de58244b162cde24166303f1659c45cf704214..e4d8a26daab3299c58e7d6c18800979becbd77f1 100644 (file)
--- a/statx.h
+++ b/statx.h
@@ -6,9 +6,9 @@
  */
 
 #ifndef STRACE_STATX_H
-#define STRACE_STATX_H
+# define STRACE_STATX_H
 
-#include <stdint.h>
+# include <stdint.h>
 
 typedef struct {
        int64_t sec;
index d4aae01bf40e223650b779d79814046545f6a4e7..06e2796a9a21fd01400a54e6eef98259147e8e7c 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -171,10 +171,10 @@ static void timer_sighandler(int);
 
 #ifndef HAVE_STRERROR
 
-#if !HAVE_DECL_SYS_ERRLIST
+# if !HAVE_DECL_SYS_ERRLIST
 extern int sys_nerr;
 extern char *sys_errlist[];
-#endif
+# endif
 
 const char *
 strerror(int err_no)
index 3f9608bf434de25f8dd5d69cc18bf912c5badacc..3eb9c8e70fb0db91a4df97c2f385b56af48fe826 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 #ifndef STRACE_STRING_TO_UINT_H
-#define STRACE_STRING_TO_UINT_H
+# define STRACE_STRING_TO_UINT_H
 
-#include <limits.h>
+# include <limits.h>
 
-#include "kernel_types.h"
+# include "kernel_types.h"
 
 extern long long
 string_to_uint_ex(const char *str, char **endptr,
index a4e3ea54c088c32e367e81f3b4691b0936a50333..d78f51dd365240c316abb635e0b9ea3699aa2b9d 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -162,27 +162,27 @@ const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES] = {
 };
 
 const char *const personality_names[] =
-# if defined X86_64
+#if defined X86_64
        {"64 bit", "32 bit", "x32"}
-# elif defined X32
+#elif defined X32
        {"x32", "32 bit"}
-# elif SUPPORTED_PERSONALITIES == 2
+#elif SUPPORTED_PERSONALITIES == 2
        {"64 bit", "32 bit"}
-# else
+#else
        {STRINGIFY_VAL(__WORDSIZE) " bit"}
-# endif
+#endif
        ;
 
 const char *const personality_designators[] =
-# if defined X86_64
+#if defined X86_64
        { "64", "32", "x32" }
-# elif defined X32
+#elif defined X32
        { "x32", "32" }
-# elif SUPPORTED_PERSONALITIES == 2
+#elif SUPPORTED_PERSONALITIES == 2
        { "64", "32" }
-# else
+#else
        { STRINGIFY_VAL(__WORDSIZE) }
-# endif
+#endif
        ;
 
 #if SUPPORTED_PERSONALITIES > 1
@@ -194,9 +194,9 @@ unsigned current_wordsize = PERSONALITY0_WORDSIZE;
 static const int personality_wordsize[SUPPORTED_PERSONALITIES] = {
        PERSONALITY0_WORDSIZE,
        PERSONALITY1_WORDSIZE,
-# if SUPPORTED_PERSONALITIES > 2
+#  if SUPPORTED_PERSONALITIES > 2
        PERSONALITY2_WORDSIZE,
-# endif
+#  endif
 };
 # endif
 
@@ -956,7 +956,7 @@ ptrace_syscall_info_is_valid(void)
 }
 
 #define XLAT_MACROS_ONLY
-# include "xlat/nt_descriptor_types.h"
+#include "xlat/nt_descriptor_types.h"
 #undef XLAT_MACROS_ONLY
 
 #define ARCH_MIGHT_USE_SET_REGS 1
index 71119a999600530817bf04717a4f5a3c767d6f05..336a30bfe437a95c7f4ae14f0765e9123ed63cbf 100644 (file)
--- a/sysent.h
+++ b/sysent.h
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_SYSENT_H
-#define STRACE_SYSENT_H
+# define STRACE_SYSENT_H
 
 typedef struct sysent {
        unsigned nargs;
@@ -16,25 +16,25 @@ typedef struct sysent {
        const char *sys_name;
 } struct_sysent;
 
-#define TRACE_FILE                     00000001        /* Trace file-related syscalls. */
-#define TRACE_IPC                      00000002        /* Trace IPC-related syscalls. */
-#define TRACE_NETWORK                  00000004        /* Trace network-related syscalls. */
-#define TRACE_PROCESS                  00000010        /* Trace process-related syscalls. */
-#define TRACE_SIGNAL                   00000020        /* Trace signal-related syscalls. */
-#define TRACE_DESC                     00000040        /* Trace file descriptor-related syscalls. */
-#define TRACE_MEMORY                   00000100        /* Trace memory mapping-related syscalls. */
-#define SYSCALL_NEVER_FAILS            00000200        /* Syscall is always successful. */
-#define MEMORY_MAPPING_CHANGE          00000400        /* Trigger proc/maps cache updating */
-#define STACKTRACE_CAPTURE_ON_ENTER    00001000        /* Capture stacktrace on "entering" stage */
-#define TRACE_INDIRECT_SUBCALL         00002000        /* Syscall is an indirect socket/ipc subcall. */
-#define COMPAT_SYSCALL_TYPES           00004000        /* A compat syscall that uses compat types. */
-#define TRACE_STAT                     00010000        /* Trace {,*_}{,old}{,x}stat{,64} syscalls. */
-#define TRACE_LSTAT                    00020000        /* Trace *lstat* syscalls. */
-#define TRACE_STATFS                   00040000        /* Trace statfs, statfs64, and statvfs syscalls. */
-#define TRACE_FSTATFS                  00100000        /* Trace fstatfs, fstatfs64 and fstatvfs syscalls. */
-#define TRACE_STATFS_LIKE              00200000        /* Trace statfs-like, fstatfs-like and ustat syscalls. */
-#define TRACE_FSTAT                    00400000        /* Trace *fstat{,at}{,64} syscalls. */
-#define TRACE_STAT_LIKE                        01000000        /* Trace *{,l,f}stat{,x,at}{,64} syscalls. */
-#define TRACE_PURE                     02000000        /* Trace getter syscalls with no arguments. */
+# define TRACE_FILE                    00000001        /* Trace file-related syscalls. */
+# define TRACE_IPC                     00000002        /* Trace IPC-related syscalls. */
+# define TRACE_NETWORK                 00000004        /* Trace network-related syscalls. */
+# define TRACE_PROCESS                 00000010        /* Trace process-related syscalls. */
+# define TRACE_SIGNAL                  00000020        /* Trace signal-related syscalls. */
+# define TRACE_DESC                    00000040        /* Trace file descriptor-related syscalls. */
+# define TRACE_MEMORY                  00000100        /* Trace memory mapping-related syscalls. */
+# define SYSCALL_NEVER_FAILS           00000200        /* Syscall is always successful. */
+# define MEMORY_MAPPING_CHANGE         00000400        /* Trigger proc/maps cache updating */
+# define STACKTRACE_CAPTURE_ON_ENTER   00001000        /* Capture stacktrace on "entering" stage */
+# define TRACE_INDIRECT_SUBCALL                00002000        /* Syscall is an indirect socket/ipc subcall. */
+# define COMPAT_SYSCALL_TYPES          00004000        /* A compat syscall that uses compat types. */
+# define TRACE_STAT                    00010000        /* Trace {,*_}{,old}{,x}stat{,64} syscalls. */
+# define TRACE_LSTAT                   00020000        /* Trace *lstat* syscalls. */
+# define TRACE_STATFS                  00040000        /* Trace statfs, statfs64, and statvfs syscalls. */
+# define TRACE_FSTATFS                 00100000        /* Trace fstatfs, fstatfs64 and fstatvfs syscalls. */
+# define TRACE_STATFS_LIKE             00200000        /* Trace statfs-like, fstatfs-like and ustat syscalls. */
+# define TRACE_FSTAT                   00400000        /* Trace *fstat{,at}{,64} syscalls. */
+# define TRACE_STAT_LIKE               01000000        /* Trace *{,l,f}stat{,x,at}{,64} syscalls. */
+# define TRACE_PURE                    02000000        /* Trace getter syscalls with no arguments. */
 
 #endif /* !STRACE_SYSENT_H */
index d2b4b837c95eab266c72b326f6e44805b9d2c001..b0b7eea2554bb82165a47a6e823de79424e4d670 100644 (file)
--- a/sysmips.c
+++ b/sysmips.c
 
 #ifdef MIPS
 
-#ifdef HAVE_LINUX_UTSNAME_H
-# include <linux/utsname.h>
-#endif
-#ifdef HAVE_ASM_SYSMIPS_H
-# include <asm/sysmips.h>
-#endif
-
-#ifndef __NEW_UTS_LEN
-# define __NEW_UTS_LEN 64
-#endif
-
-#include "xlat/sysmips_operations.h"
+# ifdef HAVE_LINUX_UTSNAME_H
+#  include <linux/utsname.h>
+# endif
+# ifdef HAVE_ASM_SYSMIPS_H
+#  include <asm/sysmips.h>
+# endif
+
+# ifndef __NEW_UTS_LEN
+#  define __NEW_UTS_LEN 64
+# endif
+
+# include "xlat/sysmips_operations.h"
 
 SYS_FUNC(sysmips)
 {
index fa60ea7df0b4252ded0840fd1d6bcd88e1c082b6..4152ad651daaf0ca3662957a132808ab2dec61e6 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define  _GNU_SOURCE 1
+# define _GNU_SOURCE 1
 #endif
 
 #include <errno.h>
index f2b2bce4c9b69045e6660118cc374517d4aff7df..80726fe0165dfc149949c2bdd066e32855072680 100644 (file)
 #ifdef __ia64__
 extern int __clone2(int (*fn) (void *), void *child_stack_base,
                size_t stack_size, int flags, void *arg, ...);
-#define clone2 __clone2
+# define clone2 __clone2
 #elif defined(__metag__)
-#define clone2(func, stack_base, size, flags, arg...) \
+# define clone2(func, stack_base, size, flags, arg...) \
        clone(func, stack_base, flags, arg)
 #else
-#define clone2(func, stack_base, size, flags, arg...) \
+# define clone2(func, stack_base, size, flags, arg...) \
        clone(func, (stack_base) + (size), flags, arg)
 #endif
 /* Direct calls to syscalls, avoiding libc wrappers */
index 7925d5892075618cbb355ad20ac00a49ce1cc6f6..0fbdc690ef6a0b8cbd2c236f6e6febab11b2a567 100644 (file)
@@ -6,13 +6,13 @@
  */
 
 #ifndef _STRACE_TESTS_ACCEPT_COMPAT_H_
-#define _STRACE_TESTS_ACCEPT_COMPAT_H_
+# define _STRACE_TESTS_ACCEPT_COMPAT_H_
 
-#include <unistd.h>
-#include <sys/socket.h>
-#include <asm/unistd.h>
+# include <unistd.h>
+# include <sys/socket.h>
+# include <asm/unistd.h>
 
-#if defined __NR_socketcall && defined __sparc__
+# if defined __NR_socketcall && defined __sparc__
 /*
  * Work around the fact that
  * - glibc >= 2.26 uses accept4 syscall to implement accept() call on sparc;
@@ -25,8 +25,8 @@ do_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
        return syscall(__NR_socketcall, 5, args);
 }
-#else
-# define do_accept accept
-#endif
+# else
+#  define do_accept accept
+# endif
 
 #endif /* !_STRACE_TESTS_ACCEPT_COMPAT_H_ */
index b6a8e462056aa75594cee8b10cb480a15192bb0b..e95afda27b3d5be9f52116d275dd93a45315d5de 100644 (file)
@@ -273,7 +273,7 @@ main(void)
         * This has to be a macro, otherwise the compiler complains that
         * initializer element is not constant.
         */
-       #define  MAP_INFO_SZ (sizeof(*map_info) + 64)
+#define MAP_INFO_SZ (sizeof(*map_info) + 64)
        struct bpf_map_info_struct *map_info = calloc(1, MAP_INFO_SZ);
        struct BPF_OBJ_GET_INFO_BY_FD_struct bpf_map_get_info_attr = {
                .bpf_fd   = map_fd,
@@ -329,7 +329,7 @@ main(void)
         * This has to be a macro, otherwise the compiler complains that
         * initializer element is not constant.
         */
-       #define  PROG_INFO_SZ (sizeof(*prog_info) + 64)
+# define PROG_INFO_SZ (sizeof(*prog_info) + 64)
        struct bpf_prog_info_struct *prog_info = calloc(1, PROG_INFO_SZ);
        struct bpf_insn *xlated_prog = tail_alloc(sizeof(*xlated_prog) * 42);
        uint32_t *map_ids = tail_alloc(sizeof(*map_ids) * 2);
index e69438e2362b8c4d8851d937519e3b47af315241..27ace56fa9a850ebfd2b55bc73f2fa1a0f1d2330 100644 (file)
@@ -9,65 +9,65 @@
 
 #ifdef HAVE_LINUX_BTRFS_H
 
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <sys/vfs.h>
-#include <linux/fs.h>
-#include <linux/btrfs.h>
-#include <linux/magic.h>
-#include "xlat.h"
-
-#include "xlat/btrfs_balance_args.h"
-#include "xlat/btrfs_balance_flags.h"
-#include "xlat/btrfs_balance_state.h"
-#include "xlat/btrfs_compress_types.h"
-#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
-#include "xlat/btrfs_defrag_flags.h"
-#include "xlat/btrfs_dev_stats_values.h"
-#include "xlat/btrfs_dev_stats_flags.h"
-#include "xlat/btrfs_qgroup_inherit_flags.h"
-#include "xlat/btrfs_qgroup_limit_flags.h"
-#include "xlat/btrfs_scrub_flags.h"
-#include "xlat/btrfs_send_flags.h"
-#include "xlat/btrfs_space_info_flags.h"
-#include "xlat/btrfs_snap_flags_v2.h"
-#include "xlat/btrfs_tree_objectids.h"
-#include "xlat/btrfs_features_compat.h"
-#include "xlat/btrfs_features_compat_ro.h"
-#include "xlat/btrfs_features_incompat.h"
-#include "xlat/btrfs_key_types.h"
-
-#ifdef HAVE_LINUX_FIEMAP_H
-# include <linux/fiemap.h>
-# include "xlat/fiemap_flags.h"
-# include "xlat/fiemap_extent_flags.h"
-#endif
-
-#ifndef BTRFS_LABEL_SIZE
-# define BTRFS_LABEL_SIZE 256
-#endif
-
-#ifndef BTRFS_NAME_LEN
-# define BTRFS_NAME_LEN 255
-#endif
-
-#ifndef FS_IOC_GETFSLABEL
-# define FS_IOC_GETFSLABEL BTRFS_IOC_GET_FSLABEL
-#endif
-
-#ifndef FS_IOC_SETFSLABEL
-# define FS_IOC_SETFSLABEL BTRFS_IOC_SET_FSLABEL
-#endif
+# include <errno.h>
+# include <fcntl.h>
+# include <inttypes.h>
+# include <limits.h>
+# include <stdint.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+# include <unistd.h>
+# include <sys/ioctl.h>
+# include <sys/stat.h>
+# include <sys/sysmacros.h>
+# include <sys/vfs.h>
+# include <linux/fs.h>
+# include <linux/btrfs.h>
+# include <linux/magic.h>
+# include "xlat.h"
+
+# include "xlat/btrfs_balance_args.h"
+# include "xlat/btrfs_balance_flags.h"
+# include "xlat/btrfs_balance_state.h"
+# include "xlat/btrfs_compress_types.h"
+# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
+# include "xlat/btrfs_defrag_flags.h"
+# include "xlat/btrfs_dev_stats_values.h"
+# include "xlat/btrfs_dev_stats_flags.h"
+# include "xlat/btrfs_qgroup_inherit_flags.h"
+# include "xlat/btrfs_qgroup_limit_flags.h"
+# include "xlat/btrfs_scrub_flags.h"
+# include "xlat/btrfs_send_flags.h"
+# include "xlat/btrfs_space_info_flags.h"
+# include "xlat/btrfs_snap_flags_v2.h"
+# include "xlat/btrfs_tree_objectids.h"
+# include "xlat/btrfs_features_compat.h"
+# include "xlat/btrfs_features_compat_ro.h"
+# include "xlat/btrfs_features_incompat.h"
+# include "xlat/btrfs_key_types.h"
+
+# ifdef HAVE_LINUX_FIEMAP_H
+#  include <linux/fiemap.h>
+#  include "xlat/fiemap_flags.h"
+#  include "xlat/fiemap_extent_flags.h"
+# endif
+
+# ifndef BTRFS_LABEL_SIZE
+#  define BTRFS_LABEL_SIZE 256
+# endif
+
+# ifndef BTRFS_NAME_LEN
+#  define BTRFS_NAME_LEN 255
+# endif
+
+# ifndef FS_IOC_GETFSLABEL
+#  define FS_IOC_GETFSLABEL BTRFS_IOC_GET_FSLABEL
+# endif
+
+# ifndef FS_IOC_SETFSLABEL
+#  define FS_IOC_SETFSLABEL BTRFS_IOC_SET_FSLABEL
+# endif
 
 /*
  * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
@@ -92,38 +92,38 @@ const unsigned char uuid_reference[BTRFS_UUID_SIZE] = {
 
 const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210";
 
-#ifndef BTRFS_IOC_QUOTA_RESCAN
+# ifndef BTRFS_IOC_QUOTA_RESCAN
 struct btrfs_ioctl_quota_rescan_args {
        uint64_t flags, progress, reserved[6];
 };
-# define BTRFS_IOC_QUOTA_RESCAN                        \
+#  define BTRFS_IOC_QUOTA_RESCAN                       \
        _IOW(BTRFS_IOCTL_MAGIC, 44, struct btrfs_ioctl_quota_rescan_args)
-# define BTRFS_IOC_QUOTA_RESCAN_STATUS         \
+#  define BTRFS_IOC_QUOTA_RESCAN_STATUS                \
        _IOR(BTRFS_IOCTL_MAGIC, 45, struct btrfs_ioctl_quota_rescan_args)
-#endif
+# endif
 
-#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
-# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
-#endif
+# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
+#  define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
+# endif
 
-#ifndef BTRFS_IOC_GET_FEATURES
-# define BTRFS_IOC_GET_FEATURES                        \
+# ifndef BTRFS_IOC_GET_FEATURES
+#  define BTRFS_IOC_GET_FEATURES                       \
        _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags)
-# define BTRFS_IOC_SET_FEATURES                        \
+#  define BTRFS_IOC_SET_FEATURES                       \
        _IOW(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[2])
-# define BTRFS_IOC_GET_SUPPORTED_FEATURES      \
+#  define BTRFS_IOC_GET_SUPPORTED_FEATURES     \
        _IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[3])
-#endif
+# endif
 
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
 struct btrfs_ioctl_feature_flags {
        uint64_t compat_flags;
        uint64_t compat_ro_flags;
        uint64_t incompat_flags;
 };
-#endif
+# endif
 
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
 struct btrfs_ioctl_defrag_range_args {
        uint64_t start;
        uint64_t len;
@@ -132,10 +132,10 @@ struct btrfs_ioctl_defrag_range_args {
        uint32_t compress_type;
        uint32_t unused[4];
 };
-#endif
+# endif
 
-#ifndef FIDEDUPERANGE
-# define FIDEDUPERANGE   _IOWR(0x94, 54, struct file_dedupe_range)
+# ifndef FIDEDUPERANGE
+#  define FIDEDUPERANGE   _IOWR(0x94, 54, struct file_dedupe_range)
 struct file_dedupe_range_info {
        int64_t dest_fd;        /* in - destination file */
        uint64_t dest_offset;   /* in - start of extent in destination */
@@ -158,10 +158,10 @@ struct file_dedupe_range {
        uint32_t reserved2;     /* must be zero */
        struct file_dedupe_range_info info[0];
 };
-#endif
+# endif
 
-#ifndef BTRFS_IOC_TREE_SEARCH_V2
-# define BTRFS_IOC_TREE_SEARCH_V2      \
+# ifndef BTRFS_IOC_TREE_SEARCH_V2
+#  define BTRFS_IOC_TREE_SEARCH_V2     \
        _IOWR(BTRFS_IOCTL_MAGIC, 17, struct btrfs_ioctl_search_args_v2)
 struct btrfs_ioctl_search_args_v2 {
        struct btrfs_ioctl_search_key key; /* in/out - search parameters */
@@ -170,7 +170,7 @@ struct btrfs_ioctl_search_args_v2 {
                                            *       to store item */
        uint64_t buf[0];                   /* out - found items */
 };
-#endif
+# endif
 
 
 static const char *
@@ -216,7 +216,7 @@ sprint_makedev(unsigned long long val)
        return devid;
 }
 
-#define ioc(x_) sprint_xlat_(x_, #x_)
+# define ioc(x_) sprint_xlat_(x_, #x_)
 
 void
 prfl_btrfs(const struct xlat *xlat, const unsigned long long val,
@@ -804,8 +804,8 @@ btrfs_test_clone_ioctls(void)
                args.dest_offset);
 }
 
-#define BTRFS_COMPRESS_TYPES 2
-#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1)
+# define BTRFS_COMPRESS_TYPES 2
+# define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1)
 
 static void
 btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args,
@@ -1302,11 +1302,11 @@ btrfs_test_ino_path_ioctls(void)
                .fspath = 0,
        };
 
-#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+# ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
        args.flags =
-#else
+# else
        args.reserved[3] =
-#endif
+# endif
                        0xdeadc0defacefeeeULL;
 
 
@@ -1341,11 +1341,11 @@ btrfs_test_ino_path_ioctls(void)
        args.fspath = (uintptr_t) buf;
        args.reserved[0] = 0;
        args.reserved[2] = 0;
-#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+# ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
        args.flags =
-#else
+# else
        args.reserved[3] =
-#endif
+# endif
                        1;
 
        ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args);
@@ -1358,11 +1358,11 @@ btrfs_test_ino_path_ioctls(void)
               args.fspath);
 
        args.reserved[1] = 0;
-#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+# ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
        args.flags =
-#else
+# else
        args.reserved[3] =
-#endif
+# endif
                        0;
 
        ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args);
@@ -1371,7 +1371,7 @@ btrfs_test_ino_path_ioctls(void)
               "}) = -1 EBADF (%m)\n",
               ioc(BTRFS_IOC_LOGICAL_INO), args.inum, args.size, args.fspath);
 
-#ifdef HAVE_LINUX_FIEMAP_H
+# ifdef HAVE_LINUX_FIEMAP_H
        if (btrfs_test_root) {
                int size;
                struct stat si;
@@ -1480,7 +1480,7 @@ btrfs_test_ino_path_ioctls(void)
                close(fd);
                free(fiemap);
        }
-#endif /* HAVE_LINUX_FIEMAP_H */
+# endif /* HAVE_LINUX_FIEMAP_H */
 }
 
 /*
@@ -1830,7 +1830,7 @@ btrfs_test_dev_replace_ioctl(void)
 static void
 btrfs_test_extent_same_ioctl(void)
 {
-#ifdef BTRFS_IOC_FILE_EXTENT_SAME
+# ifdef BTRFS_IOC_FILE_EXTENT_SAME
        struct file_dedupe_range args = {
                .src_offset = 1024,
                .src_length = 10240,
@@ -1976,7 +1976,7 @@ btrfs_test_extent_same_ioctl(void)
                close(fd2);
        }
        free(argsp);
-#endif /* BTRFS_IOC_FILE_EXTENT_SAME */
+# endif /* BTRFS_IOC_FILE_EXTENT_SAME */
 }
 
 static void
index 90dc3a8c60648a25466a94372c3c5eac8afbd3ad..d7c9fbabacaf0e3b8c7c2ae19bb656937fa46af6 100644 (file)
 
 #if defined __NR_chmod
 
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
+# include <fcntl.h>
+# include <stdio.h>
+# include <unistd.h>
+# include <errno.h>
 
 int
 main(void)
index 9d1de4e7e743ccd739fbece865c4a503bef4ef16..629a69ab23caa97a0a5db2e967429adc3a57e556 100644 (file)
@@ -45,20 +45,20 @@ main(void)
        syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100);
        printf("execveat(AT_FDCWD, \"%s\""
               ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ... /* %p */]"
-#if VERBOSE
+# if VERBOSE
               ", [\"%s\", \"%s\", %p, %p, %p, ... /* %p */]"
-#else
+# else
               ", %p /* 5 vars, unterminated */"
-#endif
+# endif
               ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               Q_FILENAME, q_argv[0], q_argv[1], q_argv[2],
               argv[3], argv[4], argv[5], (char *) tail_argv + sizeof(argv),
-#if VERBOSE
+# if VERBOSE
               q_envp[0], q_envp[1], envp[2], envp[3], envp[4],
               (char *) tail_envp + sizeof(envp),
-#else
+# else
               tail_envp,
-#endif
+# endif
               errno2name());
 
        tail_argv[ARRAY_SIZE(q_argv)] = NULL;
@@ -67,34 +67,34 @@ main(void)
 
        syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100);
        printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]"
-#if VERBOSE
+# if VERBOSE
               ", [\"%s\", \"%s\"]"
-#else
+# else
               ", %p /* 2 vars */"
-#endif
+# endif
               ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               Q_FILENAME, q_argv[0], q_argv[1], q_argv[2],
-#if VERBOSE
+# if VERBOSE
               q_envp[0], q_envp[1],
-#else
+# else
               tail_envp,
-#endif
+# endif
               errno2name());
 
        syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100);
        printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]"
-#if VERBOSE
+# if VERBOSE
               ", [\"%s\"]"
-#else
+# else
               ", %p /* 1 var */"
-#endif
+# endif
               ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               Q_FILENAME, q_argv[2],
-#if VERBOSE
+# if VERBOSE
               q_envp[1],
-#else
+# else
               tail_envp + 1,
-#endif
+# endif
               errno2name());
 
        TAIL_ALLOC_OBJECT_CONST_PTR(char *, empty);
@@ -103,16 +103,16 @@ main(void)
 
        syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100);
        printf("execveat(AT_FDCWD, \"%s\", []"
-#if VERBOSE
+# if VERBOSE
               ", []"
-#else
+# else
               ", %p /* 0 vars */"
-#endif
+# endif
               ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               Q_FILENAME,
-#if !VERBOSE
+# if !VERBOSE
               empty,
-#endif
+# endif
               errno2name());
 
        char *const str_a = tail_alloc(DEFAULT_STRLEN + 2);
@@ -136,19 +136,19 @@ main(void)
        printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]);
        for (i = 1; i < DEFAULT_STRLEN; ++i)
                printf(", \"%s\"", a[i]);
-#if VERBOSE
+# if VERBOSE
        printf(", \"%s\"", a[i]);
-#else
+# else
        printf(", ...");
-#endif
-#if VERBOSE
+# endif
+# if VERBOSE
        printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]);
        for (i = 1; i <= DEFAULT_STRLEN; ++i)
                printf(", \"%s\"", b[i]);
        printf("]");
-#else
+# else
        printf("], %p /* %u vars */", b, DEFAULT_STRLEN + 1);
-#endif
+# endif
        printf(", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               errno2name());
 
@@ -156,14 +156,14 @@ main(void)
        printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]);
        for (i = 2; i <= DEFAULT_STRLEN; ++i)
                printf(", \"%s\"", a[i]);
-#if VERBOSE
+# if VERBOSE
        printf("], [\"%s\"", b[1]);
        for (i = 2; i <= DEFAULT_STRLEN; ++i)
                printf(", \"%s\"", b[i]);
        printf("]");
-#else
+# else
        printf("], %p /* %d vars */", b + 1, DEFAULT_STRLEN);
-#endif
+# endif
        printf(", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n",
               errno2name());
 
index beddf66232a13a0c9f4625d213cb135bc2f86793..f8ef089bbb48ae93b78df47262c72240a65934a6 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #ifndef STRACE_TESTS_FADVISE_H
-#define STRACE_TESTS_FADVISE_H
+# define STRACE_TESTS_FADVISE_H
 
 # include <limits.h>
 # include <stdio.h>
index b87d0df0fbfa6f4f89987534bbfa686600104a45..e7ab7c3eec8a8f3dd0aee27a394794d7c8f686f5 100644 (file)
 # include <unistd.h>
 # include <sys/fanotify.h>
 
-#if XLAT_RAW
-# define str_fan_mark_add      "0x1"
-# define str_fan_modify_ondir  "0x40000002"
-# define str_at_fdcwd          "-100"
-#elif XLAT_VERBOSE
-# define str_fan_mark_add      "0x1 /* FAN_MARK_ADD */"
-# define str_fan_modify_ondir  "0x40000002 /* FAN_MODIFY|FAN_ONDIR */"
-# define str_at_fdcwd          "-100 /* AT_FDCWD */"
-#else
-# define str_fan_mark_add      "FAN_MARK_ADD"
-# define str_fan_modify_ondir  "FAN_MODIFY|FAN_ONDIR"
-# define str_at_fdcwd          "AT_FDCWD"
-#endif
+# if XLAT_RAW
+#  define str_fan_mark_add     "0x1"
+#  define str_fan_modify_ondir "0x40000002"
+#  define str_at_fdcwd         "-100"
+# elif XLAT_VERBOSE
+#  define str_fan_mark_add     "0x1 /* FAN_MARK_ADD */"
+#  define str_fan_modify_ondir "0x40000002 /* FAN_MODIFY|FAN_ONDIR */"
+#  define str_at_fdcwd         "-100 /* AT_FDCWD */"
+# else
+#  define str_fan_mark_add     "FAN_MARK_ADD"
+#  define str_fan_modify_ondir "FAN_MODIFY|FAN_ONDIR"
+#  define str_at_fdcwd         "AT_FDCWD"
+# endif
 
 /* Performs fanotify_mark call via the syscall interface. */
 static void
@@ -73,8 +73,8 @@ struct strval64 {
        const char *str;
 };
 
-#define STR16 "0123456789abcdef"
-#define STR64 STR16 STR16 STR16 STR16
+# define STR16 "0123456789abcdef"
+# define STR64 STR16 STR16 STR16 STR16
 
 int
 main(void)
@@ -92,70 +92,70 @@ main(void)
                { F8ILL_KULONG_MASK, "0" },
                { (kernel_ulong_t) 0xdec0deddefaced00ULL,
                        "0xefaced00"
-#if !XLAT_RAW
+# if !XLAT_RAW
                        " /* FAN_MARK_??? */"
-#endif
+# endif
                        },
                { (kernel_ulong_t) 0xda7a105700000040ULL,
-#if XLAT_RAW
+# if XLAT_RAW
                        "0x40"
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
                        "0x40 /* FAN_MARK_IGNORED_SURV_MODIFY */"
-#else
+# else
                        "FAN_MARK_IGNORED_SURV_MODIFY"
-#endif
+# endif
                        },
                { (kernel_ulong_t) 0xbadc0deddeadfeedULL,
-#if XLAT_RAW || XLAT_VERBOSE
+# if XLAT_RAW || XLAT_VERBOSE
                        "0xdeadfeed"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " /* "
-#endif
-#if !XLAT_RAW
+# endif
+# if !XLAT_RAW
                        "FAN_MARK_ADD|FAN_MARK_DONT_FOLLOW|FAN_MARK_ONLYDIR|"
                        "FAN_MARK_IGNORED_MASK|FAN_MARK_IGNORED_SURV_MODIFY|"
                        "FAN_MARK_FLUSH|0xdeadfe00"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " */"
-#endif
+# endif
                        },
        };
        static const struct strval64 masks[] = {
                { ARG_ULL_STR(0) },
                { 0xdeadfeedfacebeefULL,
-#if XLAT_RAW || XLAT_VERBOSE
+# if XLAT_RAW || XLAT_VERBOSE
                        "0xdeadfeedfacebeef"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " /* "
-#endif
-#if !XLAT_RAW
+# endif
+# if !XLAT_RAW
                        "FAN_ACCESS|FAN_MODIFY|FAN_CLOSE_WRITE|FAN_OPEN|"
                        "FAN_ACCESS_PERM|FAN_ONDIR|FAN_EVENT_ON_CHILD|"
                        "0xdeadfeedb2ccbec4"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " */"
-#endif
+# endif
                        },
                { ARG_ULL_STR(0xffffffffb7fcbfc4)
-#if !XLAT_RAW
+# if !XLAT_RAW
                        " /* FAN_??? */"
-#endif
+# endif
                        },
        };
        static const struct strval dirfds[] = {
                { (kernel_ulong_t) 0xfacefeed00000001ULL, "1" },
                { (kernel_ulong_t) 0xdec0ded0ffffffffULL,
-#if XLAT_RAW
+# if XLAT_RAW
                        "-1"
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
                        "-1 /* FAN_NOFD */"
-#else
+# else
                        "FAN_NOFD"
-#endif
+# endif
                        },
                { (kernel_ulong_t) 0xbadfacedffffff9cULL, str_at_fdcwd },
                { (kernel_ulong_t) 0xdefaced1beeff00dULL, "-1091571699" },
index 210e972752648b7b17e0192ca3879ecb9013495c..bd9ffbdd5b14f2ff7f890bcbc5e688837c7f283e 100644 (file)
@@ -28,7 +28,7 @@ test_flock64_undecoded(const int cmd, const char *name)
               TEST_SYSCALL_STR, name, &fl, errstr);
 }
 
-#define TEST_FLOCK64_UNDECODED(cmd) test_flock64_undecoded(cmd, #cmd)
+# define TEST_FLOCK64_UNDECODED(cmd) test_flock64_undecoded(cmd, #cmd)
 
 static void
 test_flock64_lk64(void)
index e870e00111258a1d0ee9a0ff0a3a06c99f5751ab..38cd5af81428d11bc882b0c6527a248d2edbe684 100644 (file)
@@ -137,8 +137,8 @@ struct strval {
        const char *str;
 };
 
-#define STR16 "0123456789abcdef"
-#define STR64 STR16 STR16 STR16 STR16
+# define STR16 "0123456789abcdef"
+# define STR64 STR16 STR16 STR16 STR16
 
 int
 main(void)
index 02fda126208a966ef1af1efec91822e01a7d6ea3..36c095df0c7580f0e81dfada12495c47f6e475cc 100644 (file)
@@ -38,7 +38,7 @@
 # include <stdio.h>
 # include <unistd.h>
 
-#define MAX_STRLEN 32
+# define MAX_STRLEN 32
 static long ngroups;
 
 static void
index ae4c1e4822837f6a6f62a84ffddfeb42c1b871cd..575e15697d0bcc293ade5e3d45f6558a73bbc579 100644 (file)
@@ -20,8 +20,8 @@
 # include <sys/socket.h>
 # include <arpa/inet.h>
 
-#define        multi4addr      "224.0.0.3"
-#define        multi6addr      "ff01::c"
+# define multi4addr    "224.0.0.3"
+# define multi6addr    "ff01::c"
 
 static const char *errstr;
 
index 07c53116e54d5e2dda4f8f8423c1117c60893704..85a4a396099f2df05f2693606cc730a2dc6f2d83 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #ifndef STRACE_TESTS_INIT_DELETE_MODULE_H
-#define STRACE_TESTS_INIT_DELETE_MODULE_H
+# define STRACE_TESTS_INIT_DELETE_MODULE_H
 
 # include <stdbool.h>
 # include <stdio.h>
index 2870362479cc74c651a1fcc24c721f9d76306cde..ec4e367029ef5b4f93271aac59527f870989bc65 100644 (file)
@@ -38,12 +38,12 @@ main(void)
 {
        uint64_t data = 0;
 
-#ifndef POWERPC
+# ifndef POWERPC
        struct termios tty;
        (void) ioctl(-1, TCGETS, &tty);
        printf("ioctl(-1, TCGETS, %p)"
               " = -1 EBADF (%m)\n", &tty);
-#endif
+# endif
 
        (void) ioctl(-1, MMTIMER_GETRES, &data);
        printf("ioctl(-1, MMTIMER_GETRES, %p)"
index 2344b7c00a38c334e69bb30bad7decc6e14e460a..f05528f902b7a89eda33bce9e283efe56474bbde 100644 (file)
@@ -33,9 +33,9 @@
 # define ALIGNED_OFFSET(t_, m_) \
        ALIGNED_SIZE(offsetof(t_, m_), t_)
 
-#  ifndef DM_DEV_ARM_POLL
-#   define DM_DEV_ARM_POLL     _IOWR(DM_IOCTL, 0x10, struct dm_ioctl)
-#  endif
+# ifndef DM_DEV_ARM_POLL
+#  define DM_DEV_ARM_POLL     _IOWR(DM_IOCTL, 0x10, struct dm_ioctl)
+# endif
 
 static const char str129[] = STR32 STR32 STR32 STR32 "6";
 
@@ -482,7 +482,7 @@ main(void)
 # endif /* VERBOSE */
        printf("}) = %s\n", errstr);
 
-       #define FILL_DM_TARGET(id, id_next) \
+define FILL_DM_TARGET(id, id_next) \
                do { \
                        init_dm_target_spec(&dm_arg_open3->target##id, id); \
                        dm_arg_open3->target##id.next = \
@@ -493,7 +493,7 @@ main(void)
                        memcpy(dm_arg_open3->param##id, str129 + id * 2, id); \
                        dm_arg_open3->param##id[id] = '\0'; \
                } while (0)
-       #define PRINT_DM_TARGET(id) \
+define PRINT_DM_TARGET(id) \
                do { \
                        print_dm_target_spec(&dm_arg_open3->target##id, id); \
                        printf("\"%.*s\"}, ", id, str129 + id * 2); \
index 5fee02d428da03331802b80b3a71bae238f7988a..02be472c7c05dbbc1e71828d576aef1548543de0 100644 (file)
@@ -212,17 +212,17 @@ main(void)
        ioctl(-1, EVIOCSFF, ffe);
        print_ffe_common(ffe, "FF_CONSTANT");
 
-#  if VERBOSE
+# if VERBOSE
        printf(", constant={level=%hd", ffe->u.constant.level);
        print_envelope(&ffe->u.constant.envelope);
        printf("}");
-#  else
+# else
        printf("...");
-#  endif
+# endif
        errno = EBADF;
        printf("}) = -1 EBADF (%m)\n");
 
-#  if VERBOSE
+# if VERBOSE
        ffe->type = FF_RAMP;
        ioctl(-1, EVIOCSFF, ffe);
        print_ffe_common(ffe, "FF_RAMP");
@@ -259,7 +259,7 @@ main(void)
        print_ffe_common(ffe, "0xff /* FF_??? */");
        errno = EBADF;
        printf("}) = -1 EBADF (%m)\n");
-#  endif
+# endif
 
        ioctl(-1, _IOC(_IOC_READ, 0x45, 0x1, 0xff), lmagic);
        printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n",
index 2e7eda4168e14ba2cc04c7e9713efb33dddc56a7..26e72cec69dea004ec86f6829689c917a4bf07e7 100644 (file)
@@ -48,8 +48,8 @@
 #  define KVM_MAX_CPUID_ENTRIES 80
 # endif
 
-#include "xlat.h"
-#include "xlat/kvm_cpuid_flags.h"
+# include "xlat.h"
+# include "xlat/kvm_cpuid_flags.h"
 
 static int
 kvm_ioctl(int fd, unsigned long cmd, const char *cmd_str, void *arg)
@@ -60,7 +60,7 @@ kvm_ioctl(int fd, unsigned long cmd, const char *cmd_str, void *arg)
        return rc;
 }
 
-#define KVM_IOCTL(fd_, cmd_, arg_)     \
+# define KVM_IOCTL(fd_, cmd_, arg_)    \
        kvm_ioctl((fd_), (cmd_), #cmd_, (arg_))
 
 static const char dev[] = "/dev/kvm";
@@ -100,7 +100,7 @@ print_kvm_sregs(const struct kvm_sregs *sregs)
 {
        printf("{cs=");
        print_kvm_segment(&sregs->cs);
-#if VERBOSE
+# if VERBOSE
        printf(", ds=");
        print_kvm_segment(&sregs->ds);
        printf(", es=");
@@ -128,9 +128,9 @@ print_kvm_sregs(const struct kvm_sregs *sregs)
                printf("%#jx", (uintmax_t) sregs->interrupt_bitmap[i]);
        }
        printf("]");
-#else
+# else
        printf(", ...");
-#endif
+# endif
        printf("}");
 }
 
@@ -138,26 +138,26 @@ static void
 print_kvm_regs(const struct kvm_regs *regs)
 {
        printf("{rax=%#jx", (uintmax_t) regs->rax);
-#if VERBOSE
+# if VERBOSE
        printf(", rbx=%#jx, rcx=%#jx, rdx=%#jx, rsi=%#jx, rdi=%#jx",
               (uintmax_t) regs->rbx, (uintmax_t) regs->rcx,
               (uintmax_t) regs->rdx, (uintmax_t) regs->rsi,
               (uintmax_t) regs->rdi);
-#else
+# else
        printf(", ...");
-#endif
+# endif
        printf(", rsp=%#jx, rbp=%#jx", (uintmax_t) regs->rsp,
               (uintmax_t) regs->rbp);
-#if VERBOSE
+# if VERBOSE
        printf(", r8=%#jx, r9=%#jx, r10=%#jx, r11=%#jx, r12=%#jx, r13=%#jx"
               ", r14=%#jx, r15=%#jx",
               (uintmax_t) regs->r8, (uintmax_t) regs->r9,
               (uintmax_t) regs->r10, (uintmax_t) regs->r11,
               (uintmax_t) regs->r12, (uintmax_t) regs->r13,
               (uintmax_t) regs->r14, (uintmax_t) regs->r15);
-#else
+# else
        printf(", ...");
-#endif
+# endif
        printf(", rip=%#jx, rflags=%#jx}", (uintmax_t) regs->rip,
               (uintmax_t) regs->rflags);
 }
@@ -269,7 +269,7 @@ print_cpuid_ioctl(int fd, const char *fd_dev,
 {
        printf("ioctl(%d<%s>, %s, {nent=%u, entries=[",
               fd, fd_dev, ioctl_name, cpuid->nent);
-#if VERBOSE
+# if VERBOSE
        for (size_t i = 0; i < cpuid->nent; i++) {
                if (i)
                        printf(", ");
@@ -281,10 +281,10 @@ print_cpuid_ioctl(int fd, const char *fd_dev,
                       cpuid->entries[i].eax, cpuid->entries[i].ebx,
                       cpuid->entries[i].ecx, cpuid->entries[i].edx);
        }
-#else
+# else
        if (cpuid->nent)
                printf("...");
-#endif
+# endif
        printf("]}) = 0\n");
 }
 
@@ -344,9 +344,9 @@ main(void)
                 * "anon_inode:kvm-vcpu:0" -> "anon_inode:kvm-vcpu"
                 */
                vcpu_dev[strlen (vcpu_dev) - 2] = '\0';
-#ifdef KVM_NO_CPUID_CALLBACK
+# ifdef KVM_NO_CPUID_CALLBACK
                KVM_NO_CPUID_CALLBACK;
-#endif
+# endif
        }
 
        printf("ioctl(%d<%s>, KVM_CREATE_VCPU, 0) = %d<%s>\n",
index 59d983188fc2e40b2362d8aa4d2f0ea0f50647f7..5366560305abd48e595947e29c61a4597c343e98 100644 (file)
@@ -23,7 +23,7 @@
 #include "print_fields.h"
 
 #define XLAT_MACROS_ONLY
-# include "xlat/loop_cmds.h"
+#include "xlat/loop_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #ifndef ABBREV
index 8c070d4547ba1f146e9761cc8ea2e143041e24c2..0992ca28f7a7e6c6b29dc2d51f56ba479adf27a6 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/nbd.h>
 
 #define XLAT_MACROS_ONLY
-# include "xlat/nbd_ioctl_cmds.h"
-# include "xlat/nbd_ioctl_flags.h"
+#include "xlat/nbd_ioctl_cmds.h"
+#include "xlat/nbd_ioctl_flags.h"
 #undef XLAT_MACROS_ONLY
 
 #define RVAL_EBADF " = -1 EBADF (%m)\n"
index ae786fbe6f4046679dbcaaaa1389e37c112ed036..30cb35f6cd2689ebfc7f549b037d4a619814e944 100644 (file)
@@ -28,7 +28,7 @@
 # endif
 
 # define XLAT_MACROS_ONLY
-#  include "xlat/perf_ioctl_cmds.h"
+# include "xlat/perf_ioctl_cmds.h"
 # undef XLAT_MACROS_ONLY
 
 # define STR16 "0123456789abcdef"
index 17ab237204dac2c7e9a5790e2bdb6400a46b61da..52d9698afc3832732ce1f82f9c311d58bfc855dc 100644 (file)
 
 #ifdef HAVE_STRUCT_PTP_SYS_OFFSET
 
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <linux/ptp_clock.h>
-
-#include "xlat.h"
-#include "xlat/ptp_flags_options.h"
+# include <errno.h>
+# include <fcntl.h>
+# include <inttypes.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+# include <sys/ioctl.h>
+# include <linux/ptp_clock.h>
+
+# include "xlat.h"
+# include "xlat/ptp_flags_options.h"
 
 static void
 test_no_device(void)
index fc81f04792c4bb15137ebd1039c7f7dc95b6d6e1..e7bd7b7803f5fce58a6441ef8962d4afada55c8d 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/random.h>
 
 #define XLAT_MACROS_ONLY
-# include "xlat/random_ioctl_cmds.h"
+#include "xlat/random_ioctl_cmds.h"
 #undef XLAT_MACROS_ONLY
 
 #define RVAL_EBADF " = -1 EBADF (%m)\n"
index 815252fa1e82b8b714a7107bcc100aadaf3745fc..19104442f675dbeb682c7f92bdb01d2b44dc7b57 100644 (file)
@@ -24,8 +24,8 @@
 # include <linux/ioctl.h>
 # include <linux/userfaultfd.h>
 
-#include "xlat.h"
-#include "xlat/uffd_api_features.h"
+# include "xlat.h"
+# include "xlat/uffd_api_features.h"
 
 int
 main(void)
index 6a34b401fa1657c1cf8a91b7a57f3a6b348be326..54e9ee7c6bd933dc52873e6c111426211d104de3 100644 (file)
@@ -339,13 +339,13 @@ dprint_ioctl_v4l2(struct v4l2_format *const f,
 
                errno = saved_errno;
                printf(
-#ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
+# ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
                       ", buffersize=%u"
-#endif
+# endif
                       "}}) = -1 EBADF (%m)\n"
-#ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
+# ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
                       , f->fmt.sdr.buffersize
-#endif
+# endif
                       );
                break;
 #endif
@@ -748,14 +748,14 @@ main(void)
        struct v4l2_queryctrl *const p_v4l2_queryctrl =
                page_end - sizeof(*p_v4l2_queryctrl);
        ioctl(-1, VIDIOC_QUERYCTRL, p_v4l2_queryctrl);
-# ifdef V4L2_CTRL_FLAG_NEXT_CTRL
+#ifdef V4L2_CTRL_FLAG_NEXT_CTRL
        printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL"
               "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n",
               p_v4l2_queryctrl->id & ~V4L2_CTRL_FLAG_NEXT_CTRL);
-# else
+#else
        printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})"
               " = -1 EBADF (%m)\n", p_v4l2_queryctrl->id);
-# endif
+#endif
 
        TAIL_ALLOC_OBJECT_CONST_PTR(struct v4l2_queryctrl, p_queryctrl);
        p_queryctrl->id = V4L2_CID_SATURATION;
index 4ef342e697f38beb6a45e7ebe045cc4a607498ed..4744bd386341214d893332e209a8dcd1aefe2c13 100644 (file)
@@ -19,9 +19,9 @@
 # include <arpa/inet.h>
 # include <net/if.h>
 
-#define        multi4addr      "224.0.0.3"
-#define        multi6addr      "ff01::c"
-#define        interface       "127.0.0.1"
+# define multi4addr    "224.0.0.3"
+# define multi6addr    "ff01::c"
+# define interface     "127.0.0.1"
 
 int
 main(void)
index ffd1e721b1ea829be83715ebe286a3a0b24b9fc2..76c19d8d4b0ea6a989801d24b03521f25a1524e3 100644 (file)
@@ -94,11 +94,11 @@ main(void)
         * musl sets size to SIZE_MAX if size argument is greater than
         * PTRDIFF_MAX - musl/src/ipc/shmget.c
         */
-       #ifdef __GLIBC__
+#ifdef __GLIBC__
                (size_t) 0xdec0ded1dec0ded2ULL;
-       #else
+#else
                (size_t) 0x1e55c0de5dec0dedULL;
-       #endif
+#endif
        static const unsigned int bogus_ipc_shm_flags =
                IPC_CREAT | IPC_EXCL | SHM_HUGETLB | SHM_NORESERVE;
        static const unsigned int huge_mask = SHM_HUGE_MASK << SHM_HUGE_SHIFT;
index 2222a7e65ef05d2a113bd29e8e4ab5b33be29d0a..5e5d91eddb65c6e5f01253311f09d839ca0919e4 100644 (file)
@@ -25,7 +25,7 @@ struct strval {
        const char *str;
 };
 
-#define CMDLINE_STR "deadcodebaddatadefaced"
+# define CMDLINE_STR "deadcodebaddatadefaced"
 
 int
 main(void)
index 1629bc11bef081ad6fe19eaa7af2c9ad04decbb5..ccfd3b44c3c263caa9e09bfd4f22207d8f6efac7 100644 (file)
@@ -69,13 +69,13 @@ bool buf_in_arg;
 /* From ioctl_dm.c */
 # define STR32 "AbCdEfGhIjKlMnOpQrStUvWxYz012345"
 
-#if XLAT_RAW
-# define XARG_STR(v_) (v_), STRINGIFY(v_)
-#elif XLAT_VERBOSE
-# define XARG_STR(v_) (v_), STRINGIFY(v_) " /* " #v_ " */"
-#else
-# define XARG_STR ARG_STR
-#endif
+# if XLAT_RAW
+#  define XARG_STR(v_) (v_), STRINGIFY(v_)
+# elif XLAT_VERBOSE
+#  define XARG_STR(v_) (v_), STRINGIFY(v_) " /* " #v_ " */"
+# else
+#  define XARG_STR ARG_STR
+# endif
 
 /*
  * When this is called with positive size, the buffer provided is an "out"
@@ -175,13 +175,13 @@ do_keyctl(kernel_ulong_t cmd, const char *cmd_str, ...)
 
        long rc = syscall(__NR_keyctl, cmd, args[0], args[1], args[2], args[3]);
        const char *errstr = sprintrc(rc);
-#if XLAT_RAW
+# if XLAT_RAW
        printf("keyctl(%#x", (unsigned) cmd);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        printf("keyctl(%#x /* %s */", (unsigned) cmd, cmd_str);
-#else
+# else
        printf("keyctl(%s", cmd_str);
-#endif
+# endif
        for (i = 0; i < cnt; i++) {
                printf(", ");
                print_arg(args[i], arg_str[i], arg_fmt[i], arg_sz[i], rc);
@@ -297,18 +297,18 @@ main(void)
                .base = 3141592653U
        };
        static const char *kcdhp_str = "{private="
-#if XLAT_RAW || XLAT_VERBOSE
+# if XLAT_RAW || XLAT_VERBOSE
                "-6"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                " /* "
-#endif
-#if !XLAT_RAW
+# endif
+# if !XLAT_RAW
                "KEY_SPEC_GROUP_KEYRING"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                " */"
-#endif
+# endif
                ", prime=1234567890, base=-1153374643}";
 
        /*
@@ -427,14 +427,14 @@ main(void)
 
        /* Invalid command */
        do_keyctl((kernel_ulong_t) 0xbadc0dedfacefeedULL,
-#if XLAT_VERBOSE
+# if XLAT_VERBOSE
                  "KEYCTL_???"
-#else
+# else
                  "0xfacefeed"
-# if !XLAT_RAW
+#  if !XLAT_RAW
                  " /* KEYCTL_??? */"
+#  endif
 # endif
-#endif
                  ,
                  sizeof(kernel_ulong_t),
                        (kernel_ulong_t) 0xdeadfee1badc0de5ULL, NULL,
@@ -545,13 +545,13 @@ main(void)
        do_keyctl(ARG_STR(KEYCTL_SETPERM),
                  sizeof(int32_t), XARG_STR(KEY_SPEC_REQKEY_AUTH_KEY), NULL,
                  sizeof(uint32_t), 0xffffffffU,
-#if XLAT_RAW || XLAT_VERBOSE
+# if XLAT_RAW || XLAT_VERBOSE
                        "0xffffffff"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " /* "
-#endif
-#if !XLAT_RAW
+# endif
+# if !XLAT_RAW
                        "KEY_POS_VIEW|KEY_POS_READ|KEY_POS_WRITE|"
                        "KEY_POS_SEARCH|KEY_POS_LINK|KEY_POS_SETATTR|"
                        "KEY_USR_VIEW|KEY_USR_READ|KEY_USR_WRITE|"
@@ -561,10 +561,10 @@ main(void)
                        "KEY_OTH_VIEW|KEY_OTH_READ|KEY_OTH_WRITE|"
                        "KEY_OTH_SEARCH|KEY_OTH_LINK|KEY_OTH_SETATTR|"
                        "0xc0c0c0c0"
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
                        " */"
-#endif
+# endif
                        , NULL,
                  0UL);
        do_keyctl(ARG_STR(KEYCTL_SETPERM),
@@ -575,9 +575,9 @@ main(void)
                  sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL,
                  sizeof(uint32_t), 0xc0c0c0c0,
                          "0xc0c0c0c0"
-#if !XLAT_RAW
+# if !XLAT_RAW
                          " /* KEY_??? */"
-#endif
+# endif
                          ,
                          NULL,
                  0UL);
@@ -835,9 +835,9 @@ main(void)
                  sizeof(kernel_ulong_t),
                  (kernel_ulong_t) 0xfeedf157badc0dedLLU,
                  "-1159983635"
-#if !XLAT_RAW
+# if !XLAT_RAW
                  " /* KEY_REQKEY_DEFL_??? */"
-#endif
+# endif
                  , NULL, 0UL);
 
 
index 655e681e21832e9c7863d5d46e906e72ea0a1bb4..34f65478731cdaf2ce01c4a3df665ccb4066fe13 100644 (file)
@@ -23,7 +23,7 @@ socketcall(const int nr, const int call,
        int rc = -1;
        errno = ENOSYS;
 
-# ifdef __NR_socketcall
+#ifdef __NR_socketcall
        static int have_socketcall = -1;
 
        if (have_socketcall < 0) {
@@ -39,7 +39,7 @@ socketcall(const int nr, const int call,
                const long args[] = { a1, a2, a3, a4, a5 };
                rc = syscall(__NR_socketcall, call, args);
        } else
-# endif
+#endif
        {
                if (nr != -1)
                        rc = syscall(nr, a1, a2, a3, a4, a5);
index 49e1065f68e482e7c9075210505b25491911a62c..fce004bb49843eea2b436fb73a7dd5b311c35fd0 100644 (file)
@@ -100,9 +100,9 @@ test_mmsg_name(const int send_fd, const int recv_fd)
                if (i)
                        printf(", ");
                if (i >= IOV_MAX
-# if !VERBOSE
+#if !VERBOSE
                        || i >= DEFAULT_STRLEN
-# endif
+#endif
                   ) {
                        printf("...");
                        break;
index 02626be2a601c50d3324a6040f599d6c3957380a..78e370e462d6b896f1a61f8edda968d2b0a13ecb 100644 (file)
@@ -22,7 +22,7 @@
 void
 printrc(long rc)
 {
-#ifdef __x86_64__
+# ifdef __x86_64__
        int err = -rc;
 
        /* Thanks, long return type of syscall(2) */
@@ -32,9 +32,9 @@ printrc(long rc)
                errno = err;
                printf(" %s (%m)", errno2name());
        }
-#else
+# else
        printf("%s", sprintrc(rc));
-#endif
+# endif
 
        puts("");
 }
index b673e5f39b62b3d43989709562a02dcb2a7ab89a..7af0f36e017005ebe6abd063a53a08d1ebf38d36 100644 (file)
@@ -60,7 +60,7 @@ printstr(unsigned char start, unsigned int count)
        printf("\"");
 }
 
-#if DUMPIO_READ || DUMPIO_WRITE
+# if DUMPIO_READ || DUMPIO_WRITE
 static void
 dumpstr(unsigned char start, unsigned int count)
 {
@@ -94,7 +94,7 @@ dumpstr(unsigned char start, unsigned int count)
                }
        }
 }
-#endif /* DUMPIO_READ || DUMPIO_WRITE */
+# endif /* DUMPIO_READ || DUMPIO_WRITE */
 
 static void
 cleanup(void)
index 4c41bcb6436f582c47b2de0832ff4865de5e6841..95c10f1447e143cf8d7aa0404f534a78baa8d4b7 100644 (file)
@@ -598,9 +598,9 @@ check_l2(void)
                .l2_psm = htobs(h_psm),
                .l2_bdaddr.b = "abcdef",
                .l2_cid = htobs(h_cid),
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
                .l2_bdaddr_type = 0xce,
-#endif
+# endif
        };
        void *l2 = tail_memdup(&c_l2, sizeof(c_l2));
        unsigned int len = sizeof(c_l2);
@@ -610,9 +610,9 @@ check_l2(void)
               ", l2_psm=htobs(L2CAP_PSM_DYN_START + %hu)"
               ", l2_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x"
               ", l2_cid=htobs(L2CAP_CID_DYN_START + %hu)"
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
               ", l2_bdaddr_type=0xce /* BDADDR_??? */"
-#endif
+# endif
               "}, %u) = %d EBADF (%m)\n",
               (short) (h_psm - 0x1001),
               c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1],
@@ -622,18 +622,18 @@ check_l2(void)
 
        c_l2.l2_psm = htobs(1);
        c_l2.l2_cid = htobs(1);
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
        c_l2.l2_bdaddr_type = BDADDR_LE_RANDOM;
-#endif
+# endif
        memcpy(l2, &c_l2, sizeof(c_l2));
        ret = connect(-1, l2, len);
        printf("connect(-1, {sa_family=AF_BLUETOOTH"
               ", l2_psm=htobs(L2CAP_PSM_SDP)"
               ", l2_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x"
               ", l2_cid=htobs(L2CAP_CID_SIGNALING)"
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
               ", l2_bdaddr_type=BDADDR_LE_RANDOM"
-#endif
+# endif
               "}, %u) = %d EBADF (%m)\n",
               c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1],
               c_l2.l2_bdaddr.b[2], c_l2.l2_bdaddr.b[3],
@@ -642,18 +642,18 @@ check_l2(void)
 
        c_l2.l2_psm = htobs(0xbad);
        c_l2.l2_cid = htobs(8);
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
        c_l2.l2_bdaddr_type = 3;
-#endif
+# endif
        memcpy(l2, &c_l2, sizeof(c_l2));
        ret = connect(-1, l2, len);
        printf("connect(-1, {sa_family=AF_BLUETOOTH"
               ", l2_psm=htobs(0xbad /* L2CAP_PSM_??? */)"
               ", l2_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x"
               ", l2_cid=htobs(0x8 /* L2CAP_CID_??? */)"
-#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
+# ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
               ", l2_bdaddr_type=0x3 /* BDADDR_??? */"
-#endif
+# endif
               "}, %u) = %d EBADF (%m)\n",
               c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1],
               c_l2.l2_bdaddr.b[2], c_l2.l2_bdaddr.b[3],
index 30a0a07918fb7cd7b721510906891bf11f66ff43..fd901d8845fa5bffc3e6e89267464898c44e24ec 100644 (file)
@@ -345,7 +345,7 @@ test_nlmsg_done(const int fd)
               fd, nlh->nlmsg_len, num, nlh->nlmsg_len, sprintrc(rc));
 }
 
-#if defined NLM_F_CAPPED || defined NLM_F_ACK_TLVS
+# if defined NLM_F_CAPPED || defined NLM_F_ACK_TLVS
 static void
 test_ack_flags(const int fd)
 {
@@ -355,34 +355,34 @@ test_ack_flags(const int fd)
                .nlmsg_type = NLMSG_ERROR,
        };
 
-#ifdef NLM_F_CAPPED
+#  ifdef NLM_F_CAPPED
        nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CAPPED,
        rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0);
        printf("sendto(%d, {len=%u, type=NLMSG_ERROR"
               ", flags=NLM_F_REQUEST|NLM_F_CAPPED, seq=0, pid=0}"
               ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
               fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
-#endif
+#  endif
 
-#ifdef NLM_F_ACK_TLVS
+#  ifdef NLM_F_ACK_TLVS
        nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK_TLVS;
        rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0);
        printf("sendto(%d, {len=%u, type=NLMSG_ERROR"
               ", flags=NLM_F_REQUEST|NLM_F_ACK_TLVS, seq=0, pid=0}"
               ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
               fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
-#endif
+#  endif
 
-#if defined NLM_F_CAPPED && defined NLM_F_ACK_TLVS
+#  if defined NLM_F_CAPPED && defined NLM_F_ACK_TLVS
        nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CAPPED | NLM_F_ACK_TLVS;
        rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0);
        printf("sendto(%d, {len=%u, type=NLMSG_ERROR"
               ", flags=NLM_F_REQUEST|NLM_F_CAPPED|NLM_F_ACK_TLVS, seq=0, pid=0}"
               ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
               fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
-#endif
+#  endif
 }
-#endif
+# endif
 
 int main(void)
 {
@@ -399,9 +399,9 @@ int main(void)
        send_query(fd);
        test_nlmsgerr(fd);
        test_nlmsg_done(fd);
-#if defined NLM_F_CAPPED || defined NLM_F_ACK_TLVS
+# if defined NLM_F_CAPPED || defined NLM_F_ACK_TLVS
        test_ack_flags(fd);
-#endif
+# endif
 
        puts("+++ exited with 0 +++");
        return 0;
index ce2cf7670ee350bb534de70b3627d002175beaa5..f90c620826621e97830dc043df591709b8039130 100644 (file)
@@ -76,7 +76,7 @@ main(void)
                    DEFAULT_STRLEN, str, DEFAULT_STRLEN,
                    printf("{type=\"%s\"}", str));
 
-#ifdef HAVE_STRUCT_CRYPTO_REPORT_HASH
+# ifdef HAVE_STRUCT_CRYPTO_REPORT_HASH
        static const struct crypto_report_hash rhash = {
                .type = "efgh",
                .blocksize = 0xabcdefdc,
@@ -90,9 +90,9 @@ main(void)
                              PRINT_FIELD_U(", ", rhash, blocksize);
                              PRINT_FIELD_U(", ", rhash, digestsize);
                              printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_CRYPTO_REPORT_BLKCIPHER
+# ifdef HAVE_STRUCT_CRYPTO_REPORT_BLKCIPHER
        static const struct crypto_report_blkcipher rblkcipher = {
                .type = "abcd",
                .geniv = "efgh",
@@ -111,9 +111,9 @@ main(void)
                              PRINT_FIELD_U(", ", rblkcipher, max_keysize);
                              PRINT_FIELD_U(", ", rblkcipher, ivsize);
                              printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_CRYPTO_REPORT_AEAD
+# ifdef HAVE_STRUCT_CRYPTO_REPORT_AEAD
        static const struct crypto_report_aead raead = {
                .type = "abcd",
                .geniv = "efgh",
@@ -130,9 +130,9 @@ main(void)
                              PRINT_FIELD_U(", ", raead, maxauthsize);
                              PRINT_FIELD_U(", ", raead, ivsize);
                              printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_CRYPTO_REPORT_RNG
+# ifdef HAVE_STRUCT_CRYPTO_REPORT_RNG
        static const struct crypto_report_rng rrng = {
                .type = "abcd",
                .seedsize = 0xabcdefac
@@ -144,9 +144,9 @@ main(void)
                              printf("{type=\"abcd\"");
                              PRINT_FIELD_U(", ", rrng, seedsize);
                              printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_CRYPTO_REPORT_CIPHER
+# ifdef HAVE_STRUCT_CRYPTO_REPORT_CIPHER
        static const struct crypto_report_cipher rcipher = {
                .type = "abcd",
                .blocksize = 0xabcdefac,
@@ -162,7 +162,7 @@ main(void)
                              PRINT_FIELD_U(", ", rcipher, min_keysize);
                              PRINT_FIELD_U(", ", rcipher, max_keysize);
                              printf("}"));
-#endif
+# endif
 
        puts("+++ exited with 0 +++");
        return 0;
index fee503c78ebaab802950c3880e8eadb4f976123f..d5ba13e2b756889bf43902bd0d5fe6b7f2a6f4bf 100644 (file)
 # include <linux/ip.h>
 # include <linux/rtnetlink.h>
 
-#define FRA_TUN_ID 12
-#define FRA_TABLE 15
-#define FRA_UID_RANGE 20
-#define FRA_PROTOCOL 21
-#define FRA_IP_PROTO 22
-#define FRA_SPORT_RANGE 23
-#define FRA_DPORT_RANGE 24
+# define FRA_TUN_ID 12
+# define FRA_TABLE 15
+# define FRA_UID_RANGE 20
+# define FRA_PROTOCOL 21
+# define FRA_IP_PROTO 22
+# define FRA_SPORT_RANGE 23
+# define FRA_DPORT_RANGE 24
 
 # ifndef HAVE_STRUCT_FIB_RULE_PORT_RANGE
 struct fib_rule_port_range {
@@ -97,7 +97,7 @@ main(void)
                           FRA_TABLE, pattern, table_id,
                           printf("RT_TABLE_DEFAULT"));
 
-#ifdef HAVE_STRUCT_FIB_RULE_UID_RANGE
+# ifdef HAVE_STRUCT_FIB_RULE_UID_RANGE
        static const struct fib_rule_uid_range range = {
                .start = 0xabcdedad,
                .end = 0xbcdeadba
@@ -108,14 +108,14 @@ main(void)
                           PRINT_FIELD_U("{", range, start);
                           PRINT_FIELD_U(", ", range, end);
                           printf("}"));
-#endif
-#if defined HAVE_BE64TOH || defined be64toh
+# endif
+# if defined HAVE_BE64TOH || defined be64toh
        const uint64_t tun_id = 0xabcdcdbeedabadef;
        TEST_NLATTR_OBJECT(fd, nlh0, hdrlen,
                           init_rtmsg, print_rtmsg,
                           FRA_TUN_ID, pattern, tun_id,
                           printf("htobe64(%" PRIu64 ")", be64toh(tun_id)));
-#endif
+# endif
 
        uint8_t proto;
 
index eba1ca1295d9b30d1c57a81a64d21ab2b2a8503e..a8660196909833925fc4c8b02135e62e2e6f0a1d 100644 (file)
@@ -270,12 +270,12 @@ main(void)
                           PRINT_FIELD_U(", ", st64, tx_window_errors);
                           PRINT_FIELD_U(", ", st64, rx_compressed);
                           PRINT_FIELD_U(", ", st64, tx_compressed);
-#ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
+# ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
                           PRINT_FIELD_U(", ", st64, rx_nohandler);
-#endif
+# endif
                           printf("}"));
 
-#ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
+# ifdef HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER
        const unsigned int sizeof_stats64 =
                offsetofend(struct rtnl_link_stats64, tx_compressed);
        TEST_NLATTR(fd, nlh0, hdrlen,
@@ -305,7 +305,7 @@ main(void)
                    PRINT_FIELD_U(", ", st64, rx_compressed);
                    PRINT_FIELD_U(", ", st64, tx_compressed);
                    printf("}"));
-#endif /* HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER */
+# endif /* HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER */
 #endif /* HAVE_STRUCT_RTNL_LINK_STATS64 */
 
        struct nlattr nla = {
index 78d3f6f0cd5f8b11f0c200d8ec3de6eb6c2c9c80..6772ae29e423b16f96cf0ceab5da1ae5aedd641e 100644 (file)
@@ -9,13 +9,13 @@
  */
 
 #ifndef STRACE_TESTS_NLATTR_IFLA_H
-#define STRACE_TESTS_NLATTR_IFLA_H
+# define STRACE_TESTS_NLATTR_IFLA_H
 
-#include "tests.h"
+# include "tests.h"
 
-#ifndef IFLA_ATTR
-# error "Please define IFLA_ATTR before including this file"
-#endif
+# ifndef IFLA_ATTR
+#  error "Please define IFLA_ATTR before including this file"
+# endif
 
 static const unsigned int hdrlen = sizeof(struct ifinfomsg);
 
index 8b61b53f844430b1d84614f6c72196fad98fd7b3..e5e76c6022497b7862ea174be3bac3f3fa68c200 100644 (file)
@@ -26,8 +26,8 @@ enum { IFLA_AF_SPEC = 26 };
 #endif
 
 #define XLAT_MACROS_ONLY
-# include "xlat/rtnl_ifla_af_spec_inet_attrs.h"
-# include "xlat/rtnl_ifla_af_spec_inet6_attrs.h"
+#include "xlat/rtnl_ifla_af_spec_inet_attrs.h"
+#include "xlat/rtnl_ifla_af_spec_inet6_attrs.h"
 #undef XLAT_MACROS_ONLY
 
 #ifndef HAVE_STRUCT_IFLA_CACHEINFO
index 901baa04bb253ce609ccb7a1f457c382072a6455..56aad584cb7c62e044db1407e8ca3c0a7b6ec7fc 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/rtnetlink.h>
 
 #define XLAT_MACROS_ONLY
-# include <xlat/rtnl_link_attrs.h>
-# include <xlat/rtnl_ifla_info_attrs.h>
+#include <xlat/rtnl_link_attrs.h>
+#include <xlat/rtnl_ifla_info_attrs.h>
 #undef XLAT_MACROS_ONLY
 
 #define IFLA_ATTR IFLA_LINKINFO
index c494218d7ebc7ba634323a3ec7e784a19e98a767..c41ff40c95122639b881f09725f314c0734cb25e 100644 (file)
@@ -111,9 +111,9 @@ main(void)
                .ndts_rcv_probes_ucast  = 0xbcdefeacdadecdfe,
                .ndts_periodic_gc_runs  = 0xedffeadedeffbecc,
                .ndts_forced_gc_runs    = 0xfeefefeabedeedcd,
-#ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
+# ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
                .ndts_table_fulls       = 0xadebfefaecdfeade
-#endif /* HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS */
+# endif /* HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS */
        };
        TEST_NLATTR_OBJECT(fd, nlh0, hdrlen,
                           init_ndtmsg, print_ndtmsg,
@@ -128,9 +128,9 @@ main(void)
                           PRINT_FIELD_U(", ", ndtst, ndts_rcv_probes_ucast);
                           PRINT_FIELD_U(", ", ndtst, ndts_periodic_gc_runs);
                           PRINT_FIELD_U(", ", ndtst, ndts_forced_gc_runs);
-#ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
+# ifdef HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS
                           PRINT_FIELD_U(", ", ndtst, ndts_table_fulls);
-#endif /* HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS */
+# endif /* HAVE_STRUCT_NDT_STATS_NDTS_TABLE_FULLS */
                           printf("}"));
 #endif /* HAVE_STRUCT_NDT_STATS */
 
index 95b2c0b8430853665d9069684d37e8f8a2b8b05f..c0ebaf89ed009abbe2fadd6cdd4a3f0a2e11b6a8 100644 (file)
@@ -75,7 +75,7 @@ main(void)
                                  PRINT_FIELD_U(", ", sb, packets);
                                  printf("}"));
 
-#ifdef HAVE_STRUCT_GNET_STATS_RATE_EST
+# ifdef HAVE_STRUCT_GNET_STATS_RATE_EST
        static const struct gnet_stats_rate_est est = {
                .bps = 0xebcdaebd,
                .pps = 0xabdceade,
@@ -86,9 +86,9 @@ main(void)
                                  PRINT_FIELD_U("{", est, bps);
                                  PRINT_FIELD_U(", ", est, pps);
                                  printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_GNET_STATS_QUEUE
+# ifdef HAVE_STRUCT_GNET_STATS_QUEUE
        static const struct gnet_stats_queue qstats = {
                .qlen = 0xabcdeabd,
                .backlog = 0xbcdaebad,
@@ -105,9 +105,9 @@ main(void)
                                  PRINT_FIELD_U(", ", qstats, requeues);
                                  PRINT_FIELD_U(", ", qstats, overlimits);
                                  printf("}"));
-#endif
+# endif
 
-#ifdef HAVE_STRUCT_GNET_STATS_RATE_EST64
+# ifdef HAVE_STRUCT_GNET_STATS_RATE_EST64
        static const struct gnet_stats_rate_est64 est64 = {
                .bps = 0xacbdcdefafecaebf,
                .pps = 0xcdabeabdfeabceaf
@@ -118,7 +118,7 @@ main(void)
                                  PRINT_FIELD_U("{", est64, bps);
                                  PRINT_FIELD_U(", ", est64, pps);
                                  printf("}"));
-#endif
+# endif
 
        puts("+++ exited with 0 +++");
        return 0;
index 378b9fc985d2e2c180e3729611dffa51526beb94..4e927521226ac8ed796c2a4aadd5892ab93c06d7 100644 (file)
@@ -36,14 +36,14 @@ main(void)
        memset(args, 0, sizeof(*args) * 4);
 
        xselect(0);
-#ifndef PATH_TRACING_FD
+# ifndef PATH_TRACING_FD
        printf("select(NULL) = %s\n", errstr);
-#endif
+# endif
 
        xselect((uintptr_t) args);
-#ifndef PATH_TRACING_FD
+# ifndef PATH_TRACING_FD
        printf("select(%p) = %s\n", args, errstr);
-#endif
+# endif
 
        puts("+++ exited with 0 +++");
        return 0;
index 6c63f7146311a0cbf0724d56f98adee4d70592be..d4a741787515b9534a1a347a40a2a5e508dafcdf 100644 (file)
 # include <stdio.h>
 # include <unistd.h>
 
-#ifdef O_TMPFILE
+# ifdef O_TMPFILE
 /* The kernel & C libraries often inline O_DIRECTORY. */
-# define STRACE_O_TMPFILE (O_TMPFILE & ~O_DIRECTORY)
-#else
-# define STRACE_O_TMPFILE 0
-#endif
+#  define STRACE_O_TMPFILE (O_TMPFILE & ~O_DIRECTORY)
+# else
+#  define STRACE_O_TMPFILE 0
+# endif
 
 static const char sample[] = "openat.sample";
 
index ab8043f27d3b0861eed1f403bd970944115e700e..ae38b6de14a907db89739b5934a1bfd677191128 100644 (file)
@@ -236,107 +236,107 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        flags_data.raw = ((uint64_t *) attr)[5];
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP
                attr->precise_ip;
-# else
+#  else
                flags_data.flags.precise_ip;
-# endif
+#  endif
        printf(", precise_ip=%" PRIu64 " /* %s */", val, precise_ip_desc);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA
                attr->mmap_data;
-# else
+#  else
                flags_data.flags.mmap_data;
-# endif
+#  endif
        printf(", mmap_data=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL
                attr->sample_id_all;
-# else
+#  else
                flags_data.flags.sample_id_all;
-# endif
+#  endif
        printf(", sample_id_all=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST
                attr->exclude_host;
-# else
+#  else
                flags_data.flags.exclude_host;
-# endif
+#  endif
        printf(", exclude_host=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST
                attr->exclude_guest;
-# else
+#  else
                flags_data.flags.exclude_guest;
-# endif
+#  endif
        printf(", exclude_guest=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL
                attr->exclude_callchain_kernel;
-# else
+#  else
                flags_data.flags.exclude_callchain_kernel;
-# endif
+#  endif
        printf(", exclude_callchain_kernel=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER
                attr->exclude_callchain_user;
-# else
+#  else
                flags_data.flags.exclude_callchain_user;
-# endif
+#  endif
        printf(", exclude_callchain_user=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2
                attr->mmap2;
-# else
+#  else
                flags_data.flags.mmap2;
-# endif
+#  endif
        printf(", mmap2=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC
                attr->comm_exec;
-# else
+#  else
                flags_data.flags.comm_exec;
-# endif
+#  endif
        printf(", comm_exec=%" PRIu64, val);
 
        use_clockid = val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID
                attr->use_clockid;
-# else
+#  else
                flags_data.flags.use_clockid;
-# endif
+#  endif
        printf(", use_clockid=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH
                attr->context_switch;
-# else
+#  else
                flags_data.flags.context_switch;
-# endif
+#  endif
        printf(", context_switch=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD
                attr->write_backward;
-# else
+#  else
                flags_data.flags.write_backward;
-# endif
+#  endif
        printf(", write_backward=%" PRIu64, val);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_NAMESPACES
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_NAMESPACES
                attr->namespaces;
-# else
+#  else
                flags_data.flags.namespaces;
-# endif
+#  endif
        printf(", namespaces=%" PRIu64, val);
 
        val = flags_data.flags.__reserved_1;
@@ -351,11 +351,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
                printf(", bp_type=%s", bp_type);
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1
                attr->config1;
-# else
+#  else
                ((uint64_t *) attr)[56 / sizeof(uint64_t)];
-# endif
+#  endif
        printf(", %s=%#" PRIx64,
               attr->type == PERF_TYPE_BREAKPOINT ? "bp_addr" : "config1",
               val);
@@ -367,11 +367,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2
                attr->config2;
-# else
+#  else
                ((uint64_t *) attr)[64 / sizeof(uint64_t)];
-# endif
+#  endif
        if (attr->type == PERF_TYPE_BREAKPOINT)
                printf(", bp_len=%" PRIu64, val);
        else
@@ -397,11 +397,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER
                attr->sample_regs_user;
-# else
+#  else
                ((uint64_t *) attr)[80 / sizeof(uint64_t)];
-# endif
+#  endif
        printf(", sample_regs_user=%#" PRIx64, val);
 
        if (size <= 88) {
@@ -410,11 +410,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER
                attr->sample_stack_user;
-# else
+#  else
                ((uint32_t *) attr)[88 / sizeof(uint32_t)];
-# endif
+#  endif
        /*
         * Print branch sample type only in case PERF_SAMPLE_STACK_USER
         * is set in the sample_type field.
@@ -437,11 +437,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR
                attr->sample_regs_intr;
-# else
+#  else
                ((uint64_t *) attr)[96 / sizeof(uint64_t)];
-# endif
+#  endif
        printf(", sample_regs_intr=%#" PRIx64, val);
 
        /* End of version 4 of the structure */
@@ -451,11 +451,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK
                attr->aux_watermark;
-# else
+#  else
                ((uint32_t *) attr)[104 / sizeof(uint32_t)];
-# endif
+#  endif
        printf(", aux_watermark=%" PRIu32, (uint32_t) val);
 
        if (size <= 108) {
@@ -464,11 +464,11 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
        }
 
        val =
-# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK
+#  ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK
                attr->sample_max_stack;
-# else
+#  else
                ((uint16_t *) attr)[108 / sizeof(uint16_t)];
-# endif
+#  endif
        printf(", sample_max_stack=%" PRIu16, (uint16_t) val);
 
        if (size <= 110) {
index c0e01b22830a1e06ba897faff33b52e246f09697..b87cb2c6e892760c110f9aea21580741b71145a8 100644 (file)
 # include "xlat.h"
 # include "xlat/perf_event_open_flags.h"
 
-#if ULONG_MAX > UINT_MAX
-#define LONG_STR_PREFIX "ffffffff"
-#else
-#define LONG_STR_PREFIX ""
-#endif
+# if ULONG_MAX > UINT_MAX
+#  define LONG_STR_PREFIX "ffffffff"
+# else
+#  define LONG_STR_PREFIX ""
+# endif
 
 static const char *printaddr(void *ptr)
 {
index 32719ac7ce37429721ed3a0728f0093a0f17ff1b..c08bee8e1b0506e38fa48e3ecf1d50f5fa7399da 100644 (file)
@@ -20,7 +20,7 @@
 # include <string.h>
 # include <unistd.h>
 
-#define PRINT_EVENT(flag, member)                      \
+# define PRINT_EVENT(flag, member)                     \
        do {                                            \
                if (member & flag) {                    \
                        if (member != pfd->member)      \
@@ -42,18 +42,18 @@ print_pollfd_entering(const struct pollfd *const pfd)
                        PRINT_EVENT(POLLIN, events);
                        PRINT_EVENT(POLLPRI, events);
                        PRINT_EVENT(POLLOUT, events);
-#ifdef POLLRDNORM
+# ifdef POLLRDNORM
                        PRINT_EVENT(POLLRDNORM, events);
-#endif
-#ifdef POLLWRNORM
+# endif
+# ifdef POLLWRNORM
                        PRINT_EVENT(POLLWRNORM, events);
-#endif
-#ifdef POLLRDBAND
+# endif
+# ifdef POLLRDBAND
                        PRINT_EVENT(POLLRDBAND, events);
-#endif
-#ifdef POLLWRBAND
+# endif
+# ifdef POLLWRBAND
                        PRINT_EVENT(POLLWRBAND, events);
-#endif
+# endif
                        PRINT_EVENT(POLLERR, events);
                        PRINT_EVENT(POLLHUP, events);
                        PRINT_EVENT(POLLNVAL, events);
@@ -109,18 +109,18 @@ print_pollfd_exiting(const struct pollfd *const pfd,
        PRINT_EVENT(POLLIN, revents);
        PRINT_EVENT(POLLPRI, revents);
        PRINT_EVENT(POLLOUT, revents);
-#ifdef POLLRDNORM
+# ifdef POLLRDNORM
        PRINT_EVENT(POLLRDNORM, revents);
-#endif
-#ifdef POLLWRNORM
+# endif
+# ifdef POLLWRNORM
        PRINT_EVENT(POLLWRNORM, revents);
-#endif
-#ifdef POLLRDBAND
+# endif
+# ifdef POLLRDBAND
        PRINT_EVENT(POLLRDBAND, revents);
-#endif
-#ifdef POLLWRBAND
+# endif
+# ifdef POLLWRBAND
        PRINT_EVENT(POLLWRBAND, revents);
-#endif
+# endif
        PRINT_EVENT(POLLERR, revents);
        PRINT_EVENT(POLLHUP, revents);
        PRINT_EVENT(POLLNVAL, revents);
index 4259a18451ab3e382b5745ff2944cd2c74a27108..f29cfad65ab2d163566f04061368c2d63090b3bc 100644 (file)
  && defined BPF_JUMP \
  && defined BPF_STMT
 
-#define SOCK_FILTER_ALLOW_SYSCALL(nr) \
+# define SOCK_FILTER_ALLOW_SYSCALL(nr) \
                BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW)
 
-#define SOCK_FILTER_DENY_SYSCALL(nr, err) \
+# define SOCK_FILTER_DENY_SYSCALL(nr, err) \
                BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err)))
 
-#define SOCK_FILTER_KILL_PROCESS \
+# define SOCK_FILTER_KILL_PROCESS \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)
 
-#define PRINT_ALLOW_SYSCALL(nr) \
+# define PRINT_ALLOW_SYSCALL(nr) \
        printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \
               "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \
               __NR_ ## nr)
 
-#define PRINT_DENY_SYSCALL(nr, err) \
+# define PRINT_DENY_SYSCALL(nr, err) \
        printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \
               "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \
               __NR_ ## nr, err)
index d67702e45f7b38d77593e54708724c3047beff63..f0e6987df6b73929183acc7536a30c5296a763cc 100644 (file)
@@ -170,34 +170,34 @@ main(void)
 
        tprintf("%s", "");
 
-#if defined __x86_64__ && defined __ILP32__
+# if defined __x86_64__ && defined __ILP32__
        /*
         * x32 is the only architecture where preadv2 takes 5 arguments,
         * see preadv64v2 in kernel sources.
         */
        rc = syscall(__NR_preadv2, -1, NULL, vlen, pos_l, 1);
-#else
+# else
        const kernel_ulong_t pos_h =
                (sizeof(pos_l) == sizeof(pos)) ?
                (kernel_ulong_t) 0xbadc0deddeadbeefULL :
                (kernel_ulong_t) (pos >> 32);
        rc = syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1);
-#endif
+# endif
        if (rc != -1 || (ENOSYS != errno && EBADF != errno))
                perror_msg_and_fail("preadv2");
        test_dumpio = EBADF == errno;
        tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = %s\n",
                (unsigned long) vlen, pos, sprintrc(rc));
 
-#if defined __x86_64__ && defined __ILP32__
+# if defined __x86_64__ && defined __ILP32__
        /*
         * x32 is the only architecture where pwritev2 takes 5 arguments,
         * see pwritev64v2 in kernel sources.
         */
        rc = syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, 1);
-#else
+# else
        rc = syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1);
-#endif
+# endif
        if (rc != -1 || (ENOSYS != errno && EBADF != errno))
                perror_msg_and_fail("pwritev2");
        tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = %s\n",
index 1df75cb1230095b51ae07f42b5dc9f6e162427ef..3a9952766ef6e45d3b4f784e3653dcc5d4ad9e20 100644 (file)
@@ -57,9 +57,9 @@ struct if_nextdqblk {
 # include "xlat/if_dqinfo_flags.h"
 # include "xlat/if_dqinfo_valid.h"
 
-#define QUOTA_STR(_arg) (_arg), gen_quotacmd(#_arg, _arg)
-#define QUOTA_ID_STR(_arg) (_arg), gen_quotaid(#_arg, _arg)
-#define QUOTA_STR_INVALID(_arg, str) (_arg), gen_quotacmd(str, _arg)
+# define QUOTA_STR(_arg) (_arg), gen_quotacmd(#_arg, _arg)
+# define QUOTA_ID_STR(_arg) (_arg), gen_quotaid(#_arg, _arg)
+# define QUOTA_STR_INVALID(_arg, str) (_arg), gen_quotacmd(str, _arg)
 
 void
 print_dqblk(long rc, void *ptr, void *arg)
@@ -139,25 +139,25 @@ print_dqinfo(long rc, void *ptr, void *arg)
        PRINT_FIELD_U(", ", *di, dqi_igrace);
 
        printf(", dqi_flags=");
-#if XLAT_RAW
+# if XLAT_RAW
        printf("%#x", di->dqi_flags);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        printf("%#x /* ", di->dqi_flags);
        printflags(if_dqinfo_flags, di->dqi_flags, "DQF_???");
        printf(" */");
-#else /* XLAT_ABBREV */
+# else /* XLAT_ABBREV */
        printflags(if_dqinfo_flags, di->dqi_flags, "DQF_???");
-#endif
+# endif
        printf(", dqi_valid=");
-#if XLAT_RAW
+# if XLAT_RAW
        printf("%#x", di->dqi_valid);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        printf("%#x /* ", di->dqi_valid);
        printflags(if_dqinfo_valid, di->dqi_valid, "IIF_???");
        printf(" */");
-#else /* XLAT_ABBREV */
+# else /* XLAT_ABBREV */
        printflags(if_dqinfo_valid, di->dqi_valid, "IIF_???");
-#endif
+# endif
        printf("}");
 }
 
@@ -173,10 +173,10 @@ print_dqfmt(long rc, void *ptr, void *arg)
                return;
        }
        printf("[");
-#if XLAT_RAW
+# if XLAT_RAW
        printf("%#x]", *fmtval);
        return;
-#else
+# else
        switch (*fmtval) {
        case 1:
                fmtstr = "QFMT_VFS_OLD";
@@ -194,12 +194,12 @@ print_dqfmt(long rc, void *ptr, void *arg)
                printf("%#x /* QFMT_VFS_??? */]", *fmtval);
                return;
        }
-#endif
-#if XLAT_VERBOSE
+# endif
+# if XLAT_VERBOSE
        printf("%#x /* %s */]", *fmtval, fmtstr);
-#else
+# else
        printf("%s]", fmtstr);
-#endif
+# endif
 }
 
 const char *
@@ -207,13 +207,13 @@ gen_quotacmd(const char *abbrev_str, const uint32_t cmd)
 {
        static char quotacmd_str[2048];
 
-#if XLAT_RAW
+# if XLAT_RAW
        snprintf(quotacmd_str, sizeof(quotacmd_str), "%u", cmd);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        snprintf(quotacmd_str, sizeof(quotacmd_str), "%u /* %s */", cmd, abbrev_str);
-#else
+# else
        return abbrev_str;
-#endif
+# endif
        return quotacmd_str;
 }
 
@@ -222,13 +222,13 @@ gen_quotaid(const char *abbrev_str, const uint32_t id)
 {
        static char quotaid_str[1024];
 
-#if XLAT_RAW
+# if XLAT_RAW
        snprintf(quotaid_str, sizeof(quotaid_str), "%#x", id);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        snprintf(quotaid_str, sizeof(quotaid_str), "%#x /* %s */", id, abbrev_str);
-#else
+# else
        return abbrev_str;
-#endif
+# endif
        return quotaid_str;
 }
 
@@ -279,13 +279,13 @@ main(void)
        snprintf(invalid_cmd_str, sizeof(invalid_cmd_str),
                 "QCMD(Q_QUOTAON, %#x /* ???QUOTA */)",
                 QCMD_TYPE(QCMD(Q_QUOTAON, 0xfacefeed)));
-#if XLAT_RAW
+# if XLAT_RAW
        snprintf(invalid_id_str, sizeof(invalid_id_str),
                 "%#x", bogus_id);
-#else
+# else
        snprintf(invalid_id_str, sizeof(invalid_id_str),
                 "%#x /* QFMT_VFS_??? */", bogus_id);
-#endif
+# endif
        check_quota(CQF_ID_STR, QCMD(Q_QUOTAON, 0xfacefeed),
                    gen_quotacmd(invalid_cmd_str, QCMD(Q_QUOTAON, 0xfacefeed)),
                    bogus_dev, bogus_dev_str,
index e624c6aeb6261f3d72f87c6da80faa9e5ba0c31a..4d29ac11965bf070826dd2ea4cc1bf899935c974 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #ifndef STRACE_TESTS_QUOTACTL_H
-#define STRACE_TESTS_QUOTACTL_H
+# define STRACE_TESTS_QUOTACTL_H
 
 # include <inttypes.h>
 # include <stdarg.h>
@@ -165,7 +165,7 @@ check_quota(uint32_t flags, int cmd, const char *cmd_str,
 
        errstr = sprintrc(rc);
 
-#ifdef INJECT_RETVAL
+# ifdef INJECT_RETVAL
        if (rc != INJECT_RETVAL)
                error_msg_and_fail("Got a return value of %ld != %d",
                                   rc, INJECT_RETVAL);
@@ -174,7 +174,7 @@ check_quota(uint32_t flags, int cmd, const char *cmd_str,
 
        snprintf(inj_errstr, sizeof(inj_errstr), "%s (INJECTED)", errstr);
        errstr = inj_errstr;
-#endif
+# endif
 
        printf("quotactl(%s, %s", cmd_str, special_str);
 
index 3822e27f1b87495ae182e0020ac6c05c973be04e..2a2bfc6e9b57f72dfaca33973f9d111fa8aad057 100644 (file)
@@ -62,13 +62,13 @@ main(void)
               (uintmax_t) pgoff, flags1_str, errstr);
 # endif
 
-#ifdef MAP_HUGETLB
-# ifndef MAP_HUGE_2MB
-#  ifndef MAP_HUGE_SHIFT
-#   define MAP_HUGE_SHIFT 26
-#  endif
-#  define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
-# endif /* !MAP_HUGE_2MB */
+# ifdef MAP_HUGETLB
+#  ifndef MAP_HUGE_2MB
+#   ifndef MAP_HUGE_SHIFT
+#    define MAP_HUGE_SHIFT 26
+#   endif
+#   define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
+#  endif /* !MAP_HUGE_2MB */
        addr = (kernel_ulong_t) 0xfacefeeddeadf00dULL;
        size = (kernel_ulong_t) 0xdefaced1bad2beefULL;
        prot = (kernel_ulong_t) 0xdefaced00000000ULL | PROT_NONE;
@@ -80,32 +80,32 @@ main(void)
  * HP PA-RISC is the only architecture that has MAP_TYPE defined to 0x3, which
  * is also used for MAP_SHARED_VALIDATE since Linux commit v4.15-rc1~71^2^2~23.
  */
-# ifdef __hppa__
-#  define MAP_TYPE_str "MAP_SHARED_VALIDATE"
-# else
-#  define MAP_TYPE_str "0xf /* MAP_??? */"
-# endif
-# define flags2_str \
+#  ifdef __hppa__
+#   define MAP_TYPE_str "MAP_SHARED_VALIDATE"
+#  else
+#   define MAP_TYPE_str "0xf /* MAP_??? */"
+#  endif
+#  define flags2_str \
        MAP_TYPE_str "|MAP_FIXED|MAP_NORESERVE|MAP_HUGETLB|21<<MAP_HUGE_SHIFT"
 
-# if XLAT_RAW
+#  if XLAT_RAW
        printf("remap_file_pages(%#jx, %ju, %#jx, %ju, %#jx) = %s\n",
               (uintmax_t) addr, (uintmax_t) size, (uintmax_t) prot,
               (uintmax_t) pgoff, (uintmax_t) flags, errstr);
-# elif XLAT_VERBOSE
+#  elif XLAT_VERBOSE
        printf("remap_file_pages(%#jx, %ju, %#jx /* %s */, %ju, %#jx /* %s */)"
               " = %s\n",
               (uintmax_t) addr, (uintmax_t) size, (uintmax_t) prot,
               prot == PROT_NONE ? "PROT_NONE" : "PROT_???",
               (uintmax_t) pgoff, (uintmax_t) flags, flags2_str, errstr);
-# else /* XLAT_ABBREV */
+#  else /* XLAT_ABBREV */
        printf("remap_file_pages(%#jx, %ju, %s, %ju, %s) = %s\n",
               (uintmax_t) addr, (uintmax_t) size,
               prot == PROT_NONE ? "PROT_NONE" :
                                   "0xdefaced00000000 /* PROT_??? */",
               (uintmax_t) pgoff, flags2_str, errstr);
-# endif
-#endif /* MAP_HUGETLB */
+#  endif
+# endif /* MAP_HUGETLB */
 
        puts("+++ exited with 0 +++");
        return 0;
index cd40cfcf4ba90430b023b681ea1683f8ec3fc78f..9a8f7e3a9c166449a3181808270749bb0f7fe8f3 100644 (file)
@@ -42,12 +42,12 @@ main(void)
               (long long) req.tv_sec, zero_extend_signed_to_ull(req.tv_nsec),
               (long long) rem.tv_sec, zero_extend_signed_to_ull(rem.tv_nsec));
        puts("--- SIGALRM \\{si_signo=SIGALRM, si_code=SI_KERNEL\\} ---");
-#ifdef __arm__
+# ifdef __arm__
 /* old kernels used to overwrite ARM_r0 with -EINTR */
-# define ALTERNATIVE_NANOSLEEP_REQ "0xfffffffc|"
-#else
-# define ALTERNATIVE_NANOSLEEP_REQ ""
-#endif
+#  define ALTERNATIVE_NANOSLEEP_REQ "0xfffffffc|"
+# else
+#  define ALTERNATIVE_NANOSLEEP_REQ ""
+# endif
        printf("(nanosleep\\((%s\\{tv_sec=%lld, tv_nsec=%llu\\})"
               ", %p|restart_syscall\\(<\\.\\.\\."
               " resuming interrupted nanosleep \\.\\.\\.>)\\) = 0\n",
index 8d2dc455b4efdfc483b5ab02fb43f130b425389f..06b15db207df851b0887a2d9a7273278d707e8b8 100644 (file)
@@ -35,12 +35,12 @@ iterate(const char *const text, unsigned int size, void *set)
                        break;
                }
                if (size) {
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
                        if (size < sizeof(long))
                                tprintf("rt_sigpending(%s, %u) = 0\n",
                                        "[]", size);
                        else
-#endif
+# endif
                                tprintf("rt_sigpending(%s, %u) = 0\n",
                                        text, size);
                } else {
index a6fb07816318fe7e22d09a10479e2387d260d831..b4bc9f823f4c524dc4c3c7924fcbc10bd8db5218 100644 (file)
  && defined BPF_JUMP \
  && defined BPF_STMT
 
-#define SOCK_FILTER_ALLOW_SYSCALL(nr) \
+# define SOCK_FILTER_ALLOW_SYSCALL(nr) \
                BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW)
 
-#define SOCK_FILTER_DENY_SYSCALL(nr, err) \
+# define SOCK_FILTER_DENY_SYSCALL(nr, err) \
                BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err)))
 
-#define SOCK_FILTER_KILL_PROCESS \
+# define SOCK_FILTER_KILL_PROCESS \
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)
 
-#define PRINT_ALLOW_SYSCALL(nr) \
+# define PRINT_ALLOW_SYSCALL(nr) \
        tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \
               "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \
               __NR_ ## nr)
 
-#define PRINT_DENY_SYSCALL(nr, err) \
+# define PRINT_DENY_SYSCALL(nr, err) \
        tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \
               "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \
               __NR_ ## nr, err)
index 5e2323029b8cfbcbe62ffb8b9debd298f31324b4..c9b89c12054b4dc540dc29d3bee85383f3124704 100644 (file)
 # include <stdio.h>
 # include <unistd.h>
 
-#ifdef HAVE_LINUX_UTSNAME_H
-# include <linux/utsname.h>
-#endif
+# ifdef HAVE_LINUX_UTSNAME_H
+#  include <linux/utsname.h>
+# endif
 
-#ifndef __NEW_UTS_LEN
-# define __NEW_UTS_LEN 64
-#endif
+# ifndef __NEW_UTS_LEN
+#  define __NEW_UTS_LEN 64
+# endif
 
 int
 main(void)
index 95be197138ee22bbb7e02b4c97642f8792b9c4f3..fe6280ce84d33196606267b6808c5d8c8be0e225 100644 (file)
 # include <unistd.h>
 
 struct set_sa {
-#if defined MIPS
+# if defined MIPS
        unsigned int flags;
        unsigned long handler;
        unsigned long mask[1];
-#elif defined ALPHA
+# elif defined ALPHA
        unsigned long handler;
        unsigned long mask[1];
        unsigned int flags;
-#else
+# else
        unsigned long handler;
        unsigned long mask[1];
        unsigned long flags;
        unsigned long restorer;
-#endif
+# endif
 }
-#ifdef ALPHA
+# ifdef ALPHA
        ATTRIBUTE_PACKED
-#endif
+# endif
 ;
 
 typedef struct set_sa struct_set_sa;
 
-#ifdef MIPS
+# ifdef MIPS
 
 struct get_sa {
        unsigned int flags;
@@ -51,11 +51,11 @@ struct get_sa {
 
 typedef struct get_sa struct_get_sa;
 
-#else
+# else
 
 typedef struct set_sa struct_get_sa;
 
-#endif
+# endif
 
 static long
 k_sigaction(const kernel_ulong_t signum, const kernel_ulong_t new_act,
@@ -64,19 +64,19 @@ k_sigaction(const kernel_ulong_t signum, const kernel_ulong_t new_act,
        return syscall(__NR_sigaction, signum, new_act, old_act);
 }
 
-#if defined SPARC || defined SPARC64
+# if defined SPARC || defined SPARC64
 /*
  * See arch/sparc/kernel/sys_sparc_32.c:sys_sparc_sigaction
  * and arch/sparc/kernel/sys_sparc32.c:compat_sys_sparc_sigaction
  */
-# define ADDR_INT ((unsigned int) -0xdefaced)
-# define SIGNO_INT ((unsigned int) -SIGUSR1)
-# define SIG_STR "-SIGUSR1"
-#else
-# define ADDR_INT ((unsigned int) 0xdefaced)
-# define SIGNO_INT ((unsigned int) SIGUSR1)
-# define SIG_STR "SIGUSR1"
-#endif
+#  define ADDR_INT ((unsigned int) -0xdefaced)
+#  define SIGNO_INT ((unsigned int) -SIGUSR1)
+#  define SIG_STR "-SIGUSR1"
+# else
+#  define ADDR_INT ((unsigned int) 0xdefaced)
+#  define SIGNO_INT ((unsigned int) SIGUSR1)
+#  define SIG_STR "SIGUSR1"
+# endif
 static const kernel_ulong_t signo =
        (kernel_ulong_t) 0xbadc0ded00000000ULL | SIGNO_INT;
 static const kernel_ulong_t addr =
@@ -156,16 +156,16 @@ main(void)
        sigdelset(mask.libc, SIGHUP);
 
        memcpy(new_act->mask, mask.old, sizeof(mask.old));
-#ifdef SA_RESTORER
+# ifdef SA_RESTORER
        new_act->flags = SA_RESTORER;
        new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
-# define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
-# define SA_RESTORER_ARGS , new_act->restorer
-#else
+#  define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
+#  define SA_RESTORER_ARGS , new_act->restorer
+# else
        new_act->flags = SA_NODEFER;
-# define SA_RESTORER_FMT ", sa_flags=SA_NODEFER"
-# define SA_RESTORER_ARGS
-#endif
+#  define SA_RESTORER_FMT ", sa_flags=SA_NODEFER"
+#  define SA_RESTORER_ARGS
+# endif
 
        k_sigaction(signo, (uintptr_t) new_act, (uintptr_t) old_act);
        printf("sigaction(" SIG_STR ", {sa_handler=%#lx, sa_mask=~[HUP]"
index aec2a6b674a57d1d4509da9e89779b10e0898a60..11ffae83cdec3f5855ab8769111aa00e49b55158 100644 (file)
@@ -75,11 +75,11 @@ main(void)
        sigdelset(&u.libc_mask, SIGUSR2);
        const unsigned long mask2 = u.old_mask;
 
-#if SIGNAL_MASK_BY_REF
+# if SIGNAL_MASK_BY_REF
        k_sigsuspend((uintptr_t) &mask1, 0xdeadbeef, (uintptr_t) &mask2);
-#else
+# else
        k_sigsuspend(mask1, 0xdeadbeef, mask2);
-#endif
+# endif
        if (EINTR != errno)
                perror_msg_and_skip("sigsuspend");
 
index 8dbe8b285e4523922c6bcfb4783fd0ff84c20cb9..cca0f94f255d0c6f96be54a46c77a94683d6f40a 100644 (file)
@@ -7,10 +7,10 @@
 
 #ifdef MANGLE
 
-#define f0 _ZN2ns2f0Ei
-#define f1 _ZN2ns2f1Ei
-#define f2 _ZN2ns2f2Ei
-#define f3 _ZN2ns2f3Ei
+# define f0 _ZN2ns2f0Ei
+# define f1 _ZN2ns2f1Ei
+# define f2 _ZN2ns2f2Ei
+# define f3 _ZN2ns2f3Ei
 
 #endif
 
index 3c2ec378bee373a10fccbed3b0e0d2dfa514d8ee..69ec810accb4f1bb478b5082f3a76d0dcc76ffda 100644 (file)
@@ -7,53 +7,53 @@
  */
 
 #ifndef STRACE_TESTS_H
-#define STRACE_TESTS_H
+# define STRACE_TESTS_H
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
 
-#ifdef TESTS_SIZEOF_KERNEL_LONG_T
-# undef SIZEOF_KERNEL_LONG_T
-# define SIZEOF_KERNEL_LONG_T TESTS_SIZEOF_KERNEL_LONG_T
-#endif
+# ifdef TESTS_SIZEOF_KERNEL_LONG_T
+#  undef SIZEOF_KERNEL_LONG_T
+#  define SIZEOF_KERNEL_LONG_T TESTS_SIZEOF_KERNEL_LONG_T
+# endif
 
-#ifdef TESTS_SIZEOF_LONG
-# undef SIZEOF_LONG
-# define SIZEOF_LONG TESTS_SIZEOF_LONG
-#endif
+# ifdef TESTS_SIZEOF_LONG
+#  undef SIZEOF_LONG
+#  define SIZEOF_LONG TESTS_SIZEOF_LONG
+# endif
 
-#include <stdbool.h>
-#include <sys/types.h>
-#include "kernel_types.h"
-#include "gcc_compat.h"
-#include "macros.h"
+# include <stdbool.h>
+# include <sys/types.h>
+# include "kernel_types.h"
+# include "gcc_compat.h"
+# include "macros.h"
 
 /*
  * The printf-like function to use in header files
  * shared between strace and its tests.
  */
-#ifndef STRACE_PRINTF
-# define STRACE_PRINTF printf
-#endif
+# ifndef STRACE_PRINTF
+#  define STRACE_PRINTF printf
+# endif
 
 /* Tests of "strace -v" are expected to define VERBOSE to 1. */
-#ifndef VERBOSE
-# define VERBOSE 0
-#endif
+# ifndef VERBOSE
+#  define VERBOSE 0
+# endif
 
 /* xlat verbosity defaults */
-#ifndef XLAT_RAW
-# define XLAT_RAW 0
-#endif
-#ifndef XLAT_VERBOSE
-# define XLAT_VERBOSE 0
-#endif
-
-#ifndef DEFAULT_STRLEN
+# ifndef XLAT_RAW
+#  define XLAT_RAW 0
+# endif
+# ifndef XLAT_VERBOSE
+#  define XLAT_VERBOSE 0
+# endif
+
+# ifndef DEFAULT_STRLEN
 /* Default maximum # of bytes printed in printstr et al. */
-# define DEFAULT_STRLEN 32
-#endif
+#  define DEFAULT_STRLEN 32
+# endif
 
 /* Cached sysconf(_SC_PAGESIZE). */
 size_t get_page_size(void);
@@ -74,14 +74,14 @@ void error_msg_and_skip(const char *, ...)
 void perror_msg_and_skip(const char *, ...)
        ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
 
-#ifndef perror_msg_and_fail
-# define perror_msg_and_fail(fmt_, ...) \
+# ifndef perror_msg_and_fail
+#  define perror_msg_and_fail(fmt_, ...) \
        perror_msg_and_fail("%s:%d: " fmt_, __FILE__, __LINE__, ##__VA_ARGS__)
-#endif
-#ifndef perror_msg_and_fail
-# define error_msg_and_fail(fmt_, ...) \
+# endif
+# ifndef perror_msg_and_fail
+#  define error_msg_and_fail(fmt_, ...) \
        error_msg_and_fail("%s:%d: " fmt_, __FILE__, __LINE__, ##__VA_ARGS__)
-#endif
+# endif
 
 /* Stat the specified file and skip the test if the stat call failed. */
 void skip_if_unavailable(const char *);
@@ -97,7 +97,7 @@ void *tail_alloc(const size_t)
 void *tail_memdup(const void *, const size_t)
        ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2));
 
-#define midtail_alloc(after_, before_) \
+# define midtail_alloc(after_, before_) \
        ((void *) ((char *) tail_alloc(((before_) + (after_))) + (before_)))
 
 /*
@@ -105,7 +105,7 @@ void *tail_memdup(const void *, const size_t)
  * of a mapped memory region.
  * Assign its address to the specified constant pointer.
  */
-#define TAIL_ALLOC_OBJECT_CONST_PTR(type_name, type_ptr)       \
+# define TAIL_ALLOC_OBJECT_CONST_PTR(type_name, type_ptr)      \
        type_name *const type_ptr = tail_alloc(sizeof(*type_ptr))
 
 /*
@@ -113,7 +113,7 @@ void *tail_memdup(const void *, const size_t)
  * of a mapped memory region.
  * Assign its address to the specified variable pointer.
  */
-#define TAIL_ALLOC_OBJECT_VAR_PTR(type_name, type_ptr)         \
+# define TAIL_ALLOC_OBJECT_VAR_PTR(type_name, type_ptr)                \
        type_name *type_ptr = tail_alloc(sizeof(*type_ptr))
 
 /*
@@ -216,7 +216,7 @@ int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int);
 
 /* Create a netlink socket. */
 int create_nl_socket_ext(int proto, const char *name);
-#define create_nl_socket(proto)        create_nl_socket_ext((proto), #proto)
+# define create_nl_socket(proto)       create_nl_socket_ext((proto), #proto)
 
 /* Create a pipe with maximized descriptor numbers. */
 void pipe_maxfd(int pipefd[2]);
@@ -224,14 +224,14 @@ void pipe_maxfd(int pipefd[2]);
 /* if_nametoindex("lo") */
 unsigned int ifindex_lo(void);
 
-#ifdef HAVE_IF_INDEXTONAME
-# define IFINDEX_LO_STR "if_nametoindex(\"lo\")"
-#else
-# define IFINDEX_LO_STR "1"
-#endif
+# ifdef HAVE_IF_INDEXTONAME
+#  define IFINDEX_LO_STR "if_nametoindex(\"lo\")"
+# else
+#  define IFINDEX_LO_STR "1"
+# endif
 
-#define F8ILL_KULONG_SUPPORTED (sizeof(void *) < sizeof(kernel_ulong_t))
-#define F8ILL_KULONG_MASK      ((kernel_ulong_t) 0xffffffff00000000ULL)
+# define F8ILL_KULONG_SUPPORTED        (sizeof(void *) < sizeof(kernel_ulong_t))
+# define F8ILL_KULONG_MASK     ((kernel_ulong_t) 0xffffffff00000000ULL)
 
 /*
  * For 64-bit kernel_ulong_t and 32-bit pointer,
@@ -249,7 +249,7 @@ f8ill_ptr_to_kulong(const void *const ptr)
 # define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1)
 
 /* Zero-extend a signed integer type to unsigned long long. */
-#define zero_extend_signed_to_ull(v) \
+# define zero_extend_signed_to_ull(v) \
        (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \
         sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \
         sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \
@@ -257,36 +257,36 @@ f8ill_ptr_to_kulong(const void *const ptr)
         (unsigned long long) (v))
 
 /* Sign-extend an unsigned integer type to long long. */
-#define sign_extend_unsigned_to_ll(v) \
+# define sign_extend_unsigned_to_ll(v) \
        (sizeof(v) == sizeof(char) ? (long long) (char) (v) : \
         sizeof(v) == sizeof(short) ? (long long) (short) (v) : \
         sizeof(v) == sizeof(int) ? (long long) (int) (v) : \
         sizeof(v) == sizeof(long) ? (long long) (long) (v) : \
         (long long) (v))
 
-#define SKIP_MAIN_UNDEFINED(arg) \
+# define SKIP_MAIN_UNDEFINED(arg) \
        int main(void) { error_msg_and_skip("undefined: %s", arg); }
 
-#if WORDS_BIGENDIAN
-# define LL_PAIR(HI, LO) (HI), (LO)
-#else
-# define LL_PAIR(HI, LO) (LO), (HI)
-#endif
-#define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval))
+# if WORDS_BIGENDIAN
+#  define LL_PAIR(HI, LO) (HI), (LO)
+# else
+#  define LL_PAIR(HI, LO) (LO), (HI)
+# endif
+# define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval))
 
-#define ARG_STR(_arg) (_arg), #_arg
-#define ARG_ULL_STR(_arg) _arg##ULL, #_arg
+# define ARG_STR(_arg) (_arg), #_arg
+# define ARG_ULL_STR(_arg) _arg##ULL, #_arg
 
 /*
  * Assign an object of type DEST_TYPE at address DEST_ADDR
  * using memcpy to avoid potential unaligned access.
  */
-#define SET_STRUCT(DEST_TYPE, DEST_ADDR, ...)                                          \
+# define SET_STRUCT(DEST_TYPE, DEST_ADDR, ...)                                         \
        do {                                                                            \
                DEST_TYPE dest_type_tmp_var = { __VA_ARGS__ };                          \
                memcpy(DEST_ADDR, &dest_type_tmp_var, sizeof(dest_type_tmp_var));       \
        } while (0)
 
-#define NLMSG_ATTR(nlh, hdrlen) ((void *)(nlh) + NLMSG_SPACE(hdrlen))
+# define NLMSG_ATTR(nlh, hdrlen) ((void *)(nlh) + NLMSG_SPACE(hdrlen))
 
 #endif /* !STRACE_TESTS_H */
index 53a3ae32d45f4e9a5658feabd4a240ecf3ae9a90..c9c64813a066197563ac92ebe179e041b5eb159b 100644 (file)
@@ -78,9 +78,9 @@ main(void)
               sev.sigev_un.sigev_thread.attribute,
               tid[2]);
 
-#ifndef SIGEV_THREAD_ID
-# define SIGEV_THREAD_ID 4
-#endif
+# ifndef SIGEV_THREAD_ID
+#  define SIGEV_THREAD_ID 4
+# endif
        sev.sigev_notify = SIGEV_THREAD_ID;
        sev.sigev_un.tid = getpid();
        if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3]))
index a5c8f78e8f8569bddf6c8582ec49397d1ff01c5a..170b2c89388ee79ce9b99beb16294a48b10bf205 100644 (file)
@@ -19,7 +19,7 @@
 
 #if defined __NR_utimensat && defined UTIME_NOW && defined UTIME_OMIT
 
-#if SIZEOF_KERNEL_LONG_T == 4
+# if SIZEOF_KERNEL_LONG_T == 4
 #  define big_tv_sec "-559038737"
 #  define huge_tv_sec "-559038737"
 # else
index fe92449ef2017bf8ab0092bfdce67718e6b233b1..0d223bdc05462f2b2a440b26140fed6bea1e4233 100644 (file)
@@ -101,7 +101,7 @@ typedef off_t libc_off_t;
 #  define IS_STATX 0
 # endif
 
-#if !XLAT_RAW /* Fixes -Wunused warning */
+# if !XLAT_RAW /* Fixes -Wunused warning */
 static void
 print_ftype(const unsigned int mode)
 {
@@ -122,24 +122,24 @@ print_perms(const unsigned int mode)
 {
        printf("%#o", mode & ~S_IFMT);
 }
-#endif
+# endif
 
 static void
 print_st_mode(const unsigned int mode)
 {
-#if XLAT_RAW
+# if XLAT_RAW
        printf("%#o", mode);
-#elif XLAT_VERBOSE
+# elif XLAT_VERBOSE
        printf("%#o /* ", mode);
        print_ftype(mode);
        printf("|");
        print_perms(mode);
        printf(" */");
-#else
+# else
        print_ftype(mode);
        printf("|");
        print_perms(mode);
-#endif
+# endif
 }
 
 # if !IS_STATX
@@ -150,18 +150,18 @@ sprint_makedev(const unsigned long long val)
        static char devid[256];
        int ret;
 
-#if XLAT_RAW
+#  if XLAT_RAW
        ret = snprintf(devid, sizeof(devid),
                        "%#llx", val);
-#elif XLAT_VERBOSE
+#  elif XLAT_VERBOSE
        ret = snprintf(devid, sizeof(devid),
                        "%#llx /* makedev(%#x, %#x) */",
                        val, major(val), minor(val));
-#else /* XLAT_ABBREV */
+#  else /* XLAT_ABBREV */
        ret = snprintf(devid, sizeof(devid),
                        "makedev(%#x, %#x)",
                        major(val), minor(val));
-#endif
+#  endif
        if (ret < 0)
                perror_msg_and_fail("sprint_makedev(%llx)", val);
        if ((unsigned) ret >= sizeof(devid))
@@ -208,7 +208,7 @@ print_stat(const STRUCT_STAT *st)
 #   define HAVE_NSEC           0
 #  endif
 
-#define PRINT_ST_TIME(field)                                                   \
+#  define PRINT_ST_TIME(field)                                                 \
        do {                                                                    \
                printf(", st_" #field "=%lld",                                  \
                       sign_extend_unsigned_to_ll(st->st_ ## field));           \
index 7ed75ad5a0f76fc80a270d358ce8ee4b62e22679..53a711b821e5f0cee3168967485a680bf80c5c12 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_TRACE_EVENT_H
-#define STRACE_TRACE_EVENT_H
+# define STRACE_TRACE_EVENT_H
 
 /* Possible trace event loop states. Returned by next_event() and dispatched by
  * dispatch_event(). */
index d3236dea1d6d34ee02b03366e25f277cefecb995..1cf4c367befcd88dcd7002c0ae3b70d0faae290f 100644 (file)
--- a/unwind.h
+++ b/unwind.h
@@ -8,9 +8,9 @@
  */
 
 #ifndef STRACE_UNWIND_H
-#define STRACE_UNWIND_H
+# define STRACE_UNWIND_H
 
-#include "defs.h"
+# include "defs.h"
 
 /*
  * Type used in stacktrace walker.
index 7a60af192042f6f9facc564a03a22a1d707a4a7a..c251a6bb383aafb9fbe8a51b8928584917e98388 100644 (file)
@@ -38,7 +38,7 @@ tprintf_uffdio_range(const struct uffdio_range *range)
        tprints("}");
 }
 
-#define PRINT_FIELD_UFFDIO_RANGE(prefix_, where_, field_)              \
+# define PRINT_FIELD_UFFDIO_RANGE(prefix_, where_, field_)             \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \
                tprintf_uffdio_range(&(where_).field_);                 \
diff --git a/util.c b/util.c
index aefedeebe54caa44d052649b346ebb7844e91c15..bbe3fa5a5d6c12526c0812efd1bd2ccf7e7aecd2 100644 (file)
--- a/util.c
+++ b/util.c
@@ -845,19 +845,19 @@ dumpiov_upto(struct tcb *const tcp, const int len, const kernel_ulong_t addr,
                struct { uint32_t base; uint32_t len; } *iov32;
                struct { uint64_t base; uint64_t len; } *iov64;
        } iovu;
-#define iov iovu.iov64
-#define sizeof_iov \
+# define iov iovu.iov64
+# define sizeof_iov \
        (current_wordsize == 4 ? (unsigned int) sizeof(*iovu.iov32)     \
                               : (unsigned int) sizeof(*iovu.iov64))
-#define iov_iov_base(i) \
+# define iov_iov_base(i) \
        (current_wordsize == 4 ? (uint64_t) iovu.iov32[i].base : iovu.iov64[i].base)
-#define iov_iov_len(i) \
+# define iov_iov_len(i) \
        (current_wordsize == 4 ? (uint64_t) iovu.iov32[i].len : iovu.iov64[i].len)
 #else
        struct iovec *iov;
-#define sizeof_iov ((unsigned int) sizeof(*iov))
-#define iov_iov_base(i) ptr_to_kulong(iov[i].iov_base)
-#define iov_iov_len(i) iov[i].iov_len
+# define sizeof_iov ((unsigned int) sizeof(*iov))
+# define iov_iov_base(i) ptr_to_kulong(iov[i].iov_base)
+# define iov_iov_len(i) iov[i].iov_len
 #endif
        int i;
        unsigned int size = sizeof_iov * len;
diff --git a/v4l2.c b/v4l2.c
index fb6df8cc2e15ec930a66757b8029b79fc9c50d7a..edc06f2fcd2d1709eb275045752493a8ea7dc740 100644 (file)
--- a/v4l2.c
+++ b/v4l2.c
@@ -314,10 +314,10 @@ print_v4l2_format_fmt(struct tcb *const tcp, const char *prefix,
                tprints(prefix);
                tprints("fmt.sdr={pixelformat=");
                print_pixelformat(f->fmt.sdr.pixelformat, v4l2_sdr_fmts);
-#ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
+# ifdef HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE
                tprintf(", buffersize=%u",
                        f->fmt.sdr.buffersize);
-#endif
+# endif
                tprints("}");
                break;
 #endif
diff --git a/wait.h b/wait.h
index 529daf115a52cc21ed3493bee72d639f227441af..f4e626bc521d56e495318bae63297cd08c62337c 100644 (file)
--- a/wait.h
+++ b/wait.h
@@ -6,13 +6,13 @@
  */
 
 #ifndef STRACE_WAIT_H
-#define STRACE_WAIT_H
+# define STRACE_WAIT_H
 
-#include "defs.h"
+# include "defs.h"
 
-#include <sys/wait.h>
+# include <sys/wait.h>
 
-#include "static_assert.h"
+# include "static_assert.h"
 
 /*
  * On Linux, the "core dumped" flag is hard-coded to 0x80:
  * fs/coredump.c:do_coredump() between v3.7-rc1~134^2~4 and v3.10-rc1~143^2~41,
  * or fs/exec.c:do_coredump() before v3.7-rc1~134^2~4
  */
-#ifndef WCOREFLAG
-# define WCOREFLAG 0x80
-#else
+# ifndef WCOREFLAG
+#  define WCOREFLAG 0x80
+# else
 static_assert((WCOREFLAG) == 0x80, "WCOREFLAG != 0x80");
-#endif
-#ifndef WCOREDUMP
-# define WCOREDUMP(status) ((status) & (WCOREFLAG))
-#endif
+# endif
+# ifndef WCOREDUMP
+#  define WCOREDUMP(status) ((status) & (WCOREFLAG))
+# endif
 
-#ifndef W_STOPCODE
-# define W_STOPCODE(sig)  ((sig) << 8 | 0x7f)
-#endif
-#ifndef W_EXITCODE
-# define W_EXITCODE(ret, sig)  ((ret) << 8 | (sig))
-#endif
-#ifndef W_CONTINUED
-# define W_CONTINUED 0xffff
-#endif
+# ifndef W_STOPCODE
+#  define W_STOPCODE(sig)  ((sig) << 8 | 0x7f)
+# endif
+# ifndef W_EXITCODE
+#  define W_EXITCODE(ret, sig)  ((ret) << 8 | (sig))
+# endif
+# ifndef W_CONTINUED
+#  define W_CONTINUED 0xffff
+# endif
 
 #endif /* STRACE_WAIT_H */
diff --git a/xlat.h b/xlat.h
index 05778061aad1ec038175604c5d3b9f7b3a19345b..366678acd6535287171d999195b4c59fadbf5921 100644 (file)
--- a/xlat.h
+++ b/xlat.h
@@ -6,7 +6,7 @@
  */
 
 #ifndef STRACE_XLAT_H
-#define STRACE_XLAT_H
+# define STRACE_XLAT_H
 
 # include <stdint.h>
 
@@ -35,17 +35,17 @@ enum xlat_style {
        /** Always print both raw number and xlat processing result. */
        XLAT_STYLE_VERBOSE = XLAT_STYLE_RAW | XLAT_STYLE_ABBREV,
 
-#define XLAT_STYLE_FORMAT_SHIFT   2
-#define XLAT_STYLE_VERBOSITY_MASK ((1 << XLAT_STYLE_FORMAT_SHIFT) - 1)
+# define XLAT_STYLE_FORMAT_SHIFT   2
+# define XLAT_STYLE_VERBOSITY_MASK ((1 << XLAT_STYLE_FORMAT_SHIFT) - 1)
 
        XLAT_STYLE_FMT_X   = 0 << XLAT_STYLE_FORMAT_SHIFT,
        XLAT_STYLE_FMT_U   = 1 << XLAT_STYLE_FORMAT_SHIFT,
        XLAT_STYLE_FMT_D   = 2 << XLAT_STYLE_FORMAT_SHIFT,
 
-#define XLAT_STYLE_FORMAT_MASK    (3 << XLAT_STYLE_FORMAT_SHIFT)
+# define XLAT_STYLE_FORMAT_MASK    (3 << XLAT_STYLE_FORMAT_SHIFT)
 
-#define XLAT_STYLE_SPEC_BITS (XLAT_STYLE_FORMAT_SHIFT + 2)
-#define XLAT_STYLE_MASK ((1 << XLAT_STYLE_SPEC_BITS) - 1)
+# define XLAT_STYLE_SPEC_BITS (XLAT_STYLE_FORMAT_SHIFT + 2)
+# define XLAT_STYLE_MASK ((1 << XLAT_STYLE_SPEC_BITS) - 1)
 };
 
 struct xlat {
index 53f28faa28411fee0ef119447671be9ce0732923..5a592494750d2924f15c8944d95fdfe38ab9ce7a 100644 (file)
@@ -30,10 +30,10 @@ MAP_32BIT
 
 #if defined MAP_RENAME && MAP_RENAME == MAP_ANONYMOUS  /* MAP_RENAME is unusual */
 # ifndef STRACE_WORKAROUND_FOR_MAP_RENAME
-# define STRACE_WORKAROUND_FOR_MAP_RENAME
+#  define STRACE_WORKAROUND_FOR_MAP_RENAME
 /* glibc erroneously defines MAP_RENAME to MAP_ANONYMOUS on some architectures.  */
 /* This is just wrong and has to be fixed.  */
-# undef MAP_RENAME
+#  undef MAP_RENAME
 # endif
 #endif /* MAP_RENAME */
 
@@ -151,9 +151,9 @@ MAP_HUGETLB 0x40000
 
 MAP_SYNC       0x80000
 
-# if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED > 0
+#if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED > 0
 MAP_UNINITIALIZED
-# endif
+#endif
 
 #if defined __alpha__
 MAP_FIXED_NOREPLACE    0x200000
index e35ed48783201a5049b68f16d09dc0ffd9cce4c3..82377e2bc1c44bc5bfbb5ca0ca51f9fe405ba2a5 100644 (file)
@@ -89,11 +89,11 @@ O_RSYNC
 
 #if defined O_NDELAY && O_NDELAY & O_NONBLOCK  /* O_NDELAY is unusual */
 # ifndef STRACE_WORKAROUND_FOR_O_NDELAY
-# define STRACE_WORKAROUND_FOR_O_NDELAY
+#  define STRACE_WORKAROUND_FOR_O_NDELAY
 /* On sparc32 O_NDELAY is erroneously defined to (0x0004 | O_NONBLOCK).  */
 /* On many architectures O_NDELAY is defined to O_NONBLOCK.  */
 /* Both cases are wrong and have to be fixed.  */
-# undef O_NDELAY
+#  undef O_NDELAY
 # endif
 #endif /* O_NDELAY & O_NONBLOCK */
 
index f2a06178e3b34fbd2ed2a2632f8727fce59a19cb..a4e7792f4d29eccccc57187b5682aefd6975f418 100644 (file)
--- a/xmalloc.h
+++ b/xmalloc.h
  */
 
 #ifndef STRACE_XMALLOC_H
-#define STRACE_XMALLOC_H
+# define STRACE_XMALLOC_H
 
-#include <stddef.h>
-#include "gcc_compat.h"
+# include <stddef.h>
+# include "gcc_compat.h"
 
-#define xcalloc strace_calloc
-#define xmalloc strace_malloc
+# define xcalloc strace_calloc
+# define xmalloc strace_malloc
 
 void *xcalloc(size_t nmemb, size_t size)
        ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1, 2));
index 07dcaac5b0acf5746169dcc2c0ba1657602b67ce..affaf791de8184c663367200c11a3e21276dc9d0 100644 (file)
--- a/xstring.h
+++ b/xstring.h
@@ -6,13 +6,13 @@
  */
 
 #ifndef STRACE_XSTRING_H
-#define STRACE_XSTRING_H
+# define STRACE_XSTRING_H
 
-#include <stdarg.h>
-#include <stdio.h>
+# include <stdarg.h>
+# include <stdio.h>
 
-#include "error_prints.h"
-#include "gcc_compat.h"
+# include "error_prints.h"
+# include "gcc_compat.h"
 
 /**
  * Print to static buffer and die on (really unexpected) errors and overflows.
@@ -55,7 +55,7 @@ xsnprintf_(char *str, size_t size, const char *func, const char *argstr,
  * @param fmt_  Format string.
  * @param ...   Format arguments.
  */
-#define xsnprintf(str_, size_, fmt_, ...) \
+# define xsnprintf(str_, size_, fmt_, ...) \
        xsnprintf_((str_), (size_), __func__, #fmt_ ", " #__VA_ARGS__, \
                   (fmt_), __VA_ARGS__)
 
@@ -67,7 +67,7 @@ xsnprintf_(char *str, size_t size, const char *func, const char *argstr,
  * @param fmt_  Format string.
  * @param ...   Format arguments.
  */
-#define xsprintf(str_, fmt_, ...) \
+# define xsprintf(str_, fmt_, ...) \
        xsnprintf((str_), sizeof(str_) + MUST_BE_ARRAY(str_), (fmt_), \
                  __VA_ARGS__)
 
@@ -103,7 +103,7 @@ get_pos_diff_(char *str, size_t size, char *pos, const char *func,
  * @param ...   Format arguments.
  * @return      New position.
  */
-#define xappendstr(str_, pos_, fmt_, ...) \
+# define xappendstr(str_, pos_, fmt_, ...) \
        (xsnprintf((pos_), sizeof(str_) + MUST_BE_ARRAY(str_) - \
                   get_pos_diff_((str_), sizeof(str_), (pos_), __func__, \
                                 "xappendstr(" #str_ ", " #pos_ ", " #fmt_ ", " \