Browse Source

Fix preprocessor indentation

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
Dmitry V. Levin 10 months ago
parent
commit
d6c71dd061
100 changed files with 1039 additions and 1039 deletions
  1. 3
    3
      arch_defs.h
  2. 1
    1
      block.c
  3. 53
    53
      bpf_attr.h
  4. 1
    1
      bpf_filter.h
  5. 1
    1
      bpf_fprog.h
  6. 68
    68
      btrfs.c
  7. 14
    14
      cacheflush.c
  8. 300
    300
      defs.h
  9. 1
    1
      delay.h
  10. 1
    1
      dm.c
  11. 11
    11
      error_prints.h
  12. 1
    1
      evdev.c
  13. 1
    1
      evdev_mpers.c
  14. 7
    7
      f_owner_ex.h
  15. 1
    1
      filter.h
  16. 12
    12
      flock.h
  17. 94
    94
      gcc_compat.h
  18. 2
    2
      get_personality.h
  19. 11
    11
      ipc_defs.h
  20. 20
    20
      kernel_types.h
  21. 5
    5
      keyctl_kdf_params.h
  22. 4
    4
      kill_save_errno.h
  23. 1
    1
      kvm.c
  24. 20
    20
      largefile_wrappers.h
  25. 1
    1
      linux/aarch64/raw_syscall.h
  26. 1
    1
      linux/alpha/raw_syscall.h
  27. 1
    1
      linux/arc/raw_syscall.h
  28. 4
    4
      linux/arm/raw_syscall.h
  29. 1
    1
      linux/asm_stat.h
  30. 1
    1
      linux/avr32/raw_syscall.h
  31. 1
    1
      linux/bfin/raw_syscall.h
  32. 2
    2
      linux/bfin/rt_sigframe.h
  33. 115
    115
      linux/dummy.h
  34. 1
    1
      linux/hppa/raw_syscall.h
  35. 2
    2
      linux/hppa/rt_sigframe.h
  36. 1
    1
      linux/i386/raw_syscall.h
  37. 2
    2
      linux/i386/rt_sigframe.h
  38. 1
    1
      linux/ia64/raw_syscall.h
  39. 3
    3
      linux/ia64/rt_sigframe.h
  40. 3
    3
      linux/inet_diag.h
  41. 1
    1
      linux/m68k/raw_syscall.h
  42. 2
    2
      linux/m68k/rt_sigframe.h
  43. 1
    1
      linux/metag/raw_syscall.h
  44. 1
    1
      linux/microblaze/raw_syscall.h
  45. 1
    1
      linux/mips/raw_syscall.h
  46. 2
    2
      linux/mips/rt_sigframe.h
  47. 12
    12
      linux/netlink_diag.h
  48. 1
    1
      linux/nios2/arch_regs.c
  49. 1
    1
      linux/nios2/raw_syscall.h
  50. 1
    1
      linux/or1k/raw_syscall.h
  51. 12
    12
      linux/packet_diag.h
  52. 1
    1
      linux/powerpc/arch_rt_sigframe.c
  53. 1
    1
      linux/powerpc/raw_syscall.h
  54. 2
    2
      linux/powerpc64/arch_rt_sigframe.c
  55. 1
    1
      linux/riscv/raw_syscall.h
  56. 2
    2
      linux/rt_sigframe.h
  57. 1
    1
      linux/s390/raw_syscall.h
  58. 2
    2
      linux/s390/rt_sigframe.h
  59. 1
    1
      linux/sh/raw_syscall.h
  60. 2
    2
      linux/sh64/rt_sigframe.h
  61. 3
    3
      linux/smc_diag.h
  62. 4
    4
      linux/sock_diag.h
  63. 1
    1
      linux/sparc/raw_syscall.h
  64. 4
    4
      linux/sparc/rt_sigframe.h
  65. 1
    1
      linux/sparc64/arch_rt_sigframe.c
  66. 1
    1
      linux/sparc64/raw_syscall.h
  67. 6
    6
      linux/syscall.h
  68. 1
    1
      linux/tile/raw_syscall.h
  69. 2
    2
      linux/tile/rt_sigframe.h
  70. 7
    7
      linux/unix_diag.h
  71. 3
    3
      linux/x86_64/arch_get_personality.c
  72. 1
    1
      linux/x86_64/asm_stat.h
  73. 2
    2
      linux/x86_64/get_scno.c
  74. 1
    1
      linux/x86_64/raw_syscall.h
  75. 1
    1
      linux/xtensa/raw_syscall.h
  76. 1
    1
      loop.c
  77. 2
    2
      lseek.c
  78. 22
    22
      macros.h
  79. 1
    1
      mmap_cache.h
  80. 2
    2
      mmap_notify.h
  81. 19
    19
      mpers_type.h
  82. 1
    1
      msghdr.h
  83. 1
    1
      nbd_ioctl.c
  84. 3
    3
      negated_errno.h
  85. 2
    2
      net.c
  86. 36
    36
      netlink.h
  87. 1
    1
      netlink_kobject_uevent.h
  88. 2
    2
      netlink_route.h
  89. 1
    1
      netlink_smc_diag.c
  90. 3
    3
      netlink_sock_diag.h
  91. 3
    3
      nlattr.h
  92. 15
    15
      nsfs.h
  93. 9
    9
      nsig.h
  94. 2
    2
      number_set.h
  95. 11
    11
      or1k_atomic.c
  96. 1
    1
      perf.c
  97. 2
    2
      perf_event_struct.h
  98. 1
    1
      perf_ioctl.c
  99. 39
    39
      print_fields.h
  100. 0
    0
      print_sg_req_info.c

+ 3
- 3
arch_defs.h View File

@@ -7,9 +7,9 @@
7 7
 
8 8
 /* Architecture-specific definitions.  */
9 9
 #ifndef STRACE_ARCH_DEFS_H
10
-#define STRACE_ARCH_DEFS_H
10
+# define STRACE_ARCH_DEFS_H
11 11
 
12
-#include "arch_defs_.h"
13
-#include "linux/arch_defs_.h"
12
+# include "arch_defs_.h"
13
+# include "linux/arch_defs_.h"
14 14
 
15 15
 #endif /* !STRACE_ARCH_DEFS_H */

+ 1
- 1
block.c View File

@@ -47,7 +47,7 @@ typedef struct blk_user_trace_setup {
47 47
 
48 48
 /* Provide fall-back definitions for BLK* ioctls */
49 49
 #define XLAT_MACROS_ONLY
50
-# include "xlat/block_ioctl_cmds.h"
50
+#include "xlat/block_ioctl_cmds.h"
51 51
 #undef XLAT_MACROS_ONLY
52 52
 
53 53
 #include MPERS_DEFS

+ 53
- 53
bpf_attr.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_BPF_ATTR_H
9
-#define STRACE_BPF_ATTR_H
9
+# define STRACE_BPF_ATTR_H
10 10
 
11 11
 /*
12 12
  * The policy is that all fields of type uint64_t in this header file
@@ -19,21 +19,21 @@
19 19
  * v4.16-rc1~123^2~109^2~5^2~4.
20 20
  */
21 21
 
22
-#ifndef BPF_OBJ_NAME_LEN
23
-# define BPF_OBJ_NAME_LEN 16U
24
-#else
25
-# if BPF_OBJ_NAME_LEN != 16U
26
-#  error "Unexpected value of BPF_OBJ_NAME_LEN"
22
+# ifndef BPF_OBJ_NAME_LEN
23
+#  define BPF_OBJ_NAME_LEN 16U
24
+# else
25
+#  if BPF_OBJ_NAME_LEN != 16U
26
+#   error "Unexpected value of BPF_OBJ_NAME_LEN"
27
+#  endif
27 28
 # endif
28
-#endif
29 29
 
30
-#ifndef BPF_TAG_SIZE
31
-# define BPF_TAG_SIZE 8
32
-#else
33
-# if BPF_TAG_SIZE != 8
34
-#  error "Unexpected value of BPF_TAG_SIZE"
30
+# ifndef BPF_TAG_SIZE
31
+#  define BPF_TAG_SIZE 8
32
+# else
33
+#  if BPF_TAG_SIZE != 8
34
+#   error "Unexpected value of BPF_TAG_SIZE"
35
+#  endif
35 36
 # endif
36
-#endif
37 37
 
38 38
 struct BPF_MAP_CREATE_struct {
39 39
 	uint32_t map_type;
@@ -47,9 +47,9 @@ struct BPF_MAP_CREATE_struct {
47 47
 	uint32_t map_ifindex;
48 48
 };
49 49
 
50
-#define BPF_MAP_CREATE_struct_size \
50
+# define BPF_MAP_CREATE_struct_size \
51 51
 	sizeof(struct BPF_MAP_CREATE_struct)
52
-#define expected_BPF_MAP_CREATE_struct_size 48
52
+# define expected_BPF_MAP_CREATE_struct_size 48
53 53
 
54 54
 struct BPF_MAP_LOOKUP_ELEM_struct {
55 55
 	uint32_t map_fd;
@@ -57,9 +57,9 @@ struct BPF_MAP_LOOKUP_ELEM_struct {
57 57
 	uint64_t ATTRIBUTE_ALIGNED(8) value;
58 58
 };
59 59
 
60
-#define BPF_MAP_LOOKUP_ELEM_struct_size \
60
+# define BPF_MAP_LOOKUP_ELEM_struct_size \
61 61
 	sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
62
-#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
62
+# define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
63 63
 
64 64
 struct BPF_MAP_UPDATE_ELEM_struct {
65 65
 	uint32_t map_fd;
@@ -68,18 +68,18 @@ struct BPF_MAP_UPDATE_ELEM_struct {
68 68
 	uint64_t ATTRIBUTE_ALIGNED(8) flags;
69 69
 };
70 70
 
71
-#define BPF_MAP_UPDATE_ELEM_struct_size \
71
+# define BPF_MAP_UPDATE_ELEM_struct_size \
72 72
 	sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
73
-#define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
73
+# define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
74 74
 
75 75
 struct BPF_MAP_DELETE_ELEM_struct {
76 76
 	uint32_t map_fd;
77 77
 	uint64_t ATTRIBUTE_ALIGNED(8) key;
78 78
 };
79 79
 
80
-#define BPF_MAP_DELETE_ELEM_struct_size \
80
+# define BPF_MAP_DELETE_ELEM_struct_size \
81 81
 	sizeof(struct BPF_MAP_DELETE_ELEM_struct)
82
-#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
82
+# define expected_BPF_MAP_DELETE_ELEM_struct_size 16
83 83
 
84 84
 struct BPF_MAP_GET_NEXT_KEY_struct {
85 85
 	uint32_t map_fd;
@@ -87,9 +87,9 @@ struct BPF_MAP_GET_NEXT_KEY_struct {
87 87
 	uint64_t ATTRIBUTE_ALIGNED(8) next_key;
88 88
 };
89 89
 
90
-#define BPF_MAP_GET_NEXT_KEY_struct_size \
90
+# define BPF_MAP_GET_NEXT_KEY_struct_size \
91 91
 	sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
92
-#define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
92
+# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
93 93
 
94 94
 struct BPF_PROG_LOAD_struct {
95 95
 	uint32_t prog_type;
@@ -106,9 +106,9 @@ struct BPF_PROG_LOAD_struct {
106 106
 	uint32_t expected_attach_type;
107 107
 };
108 108
 
109
-#define BPF_PROG_LOAD_struct_size \
109
+# define BPF_PROG_LOAD_struct_size \
110 110
 	offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
111
-#define expected_BPF_PROG_LOAD_struct_size 72
111
+# define expected_BPF_PROG_LOAD_struct_size 72
112 112
 
113 113
 struct BPF_OBJ_PIN_struct {
114 114
 	uint64_t ATTRIBUTE_ALIGNED(8) pathname;
@@ -116,12 +116,12 @@ struct BPF_OBJ_PIN_struct {
116 116
 	uint32_t file_flags;
117 117
 };
118 118
 
119
-#define BPF_OBJ_PIN_struct_size \
119
+# define BPF_OBJ_PIN_struct_size \
120 120
 	sizeof(struct BPF_OBJ_PIN_struct)
121
-#define expected_BPF_OBJ_PIN_struct_size 16
121
+# define expected_BPF_OBJ_PIN_struct_size 16
122 122
 
123
-#define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
124
-#define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
123
+# define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
124
+# define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
125 125
 
126 126
 struct BPF_PROG_ATTACH_struct {
127 127
 	uint32_t target_fd;
@@ -130,9 +130,9 @@ struct BPF_PROG_ATTACH_struct {
130 130
 	uint32_t attach_flags;
131 131
 };
132 132
 
133
-#define BPF_PROG_ATTACH_struct_size \
133
+# define BPF_PROG_ATTACH_struct_size \
134 134
 	sizeof(struct BPF_PROG_ATTACH_struct)
135
-#define expected_BPF_PROG_ATTACH_struct_size 16
135
+# define expected_BPF_PROG_ATTACH_struct_size 16
136 136
 
137 137
 struct BPF_PROG_DETACH_struct {
138 138
 	uint32_t target_fd;
@@ -140,9 +140,9 @@ struct BPF_PROG_DETACH_struct {
140 140
 	uint32_t attach_type;
141 141
 };
142 142
 
143
-#define BPF_PROG_DETACH_struct_size \
143
+# define BPF_PROG_DETACH_struct_size \
144 144
 	sizeof(struct BPF_PROG_DETACH_struct)
145
-#define expected_BPF_PROG_DETACH_struct_size 12
145
+# define expected_BPF_PROG_DETACH_struct_size 12
146 146
 
147 147
 struct BPF_PROG_TEST_RUN_struct /* test */ {
148 148
 	uint32_t prog_fd;
@@ -155,9 +155,9 @@ struct BPF_PROG_TEST_RUN_struct /* test */ {
155 155
 	uint32_t duration;
156 156
 };
157 157
 
158
-#define BPF_PROG_TEST_RUN_struct_size \
158
+# define BPF_PROG_TEST_RUN_struct_size \
159 159
 	sizeof(struct BPF_PROG_TEST_RUN_struct)
160
-#define expected_BPF_PROG_TEST_RUN_struct_size 40
160
+# define expected_BPF_PROG_TEST_RUN_struct_size 40
161 161
 
162 162
 struct BPF_PROG_GET_NEXT_ID_struct {
163 163
 	uint32_t start_id;
@@ -165,12 +165,12 @@ struct BPF_PROG_GET_NEXT_ID_struct {
165 165
 	uint32_t open_flags;
166 166
 };
167 167
 
168
-#define BPF_PROG_GET_NEXT_ID_struct_size \
168
+# define BPF_PROG_GET_NEXT_ID_struct_size \
169 169
 	sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
170
-#define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
170
+# define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
171 171
 
172
-#define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
173
-#define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
172
+# define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
173
+# define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
174 174
 
175 175
 struct BPF_PROG_GET_FD_BY_ID_struct {
176 176
 	uint32_t prog_id;
@@ -178,9 +178,9 @@ struct BPF_PROG_GET_FD_BY_ID_struct {
178 178
 	uint32_t open_flags;
179 179
 };
180 180
 
181
-#define BPF_PROG_GET_FD_BY_ID_struct_size \
181
+# define BPF_PROG_GET_FD_BY_ID_struct_size \
182 182
 	sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
183
-#define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
183
+# define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
184 184
 
185 185
 struct BPF_MAP_GET_FD_BY_ID_struct {
186 186
 	uint32_t map_id;
@@ -188,9 +188,9 @@ struct BPF_MAP_GET_FD_BY_ID_struct {
188 188
 	uint32_t open_flags;
189 189
 };
190 190
 
191
-#define BPF_MAP_GET_FD_BY_ID_struct_size \
191
+# define BPF_MAP_GET_FD_BY_ID_struct_size \
192 192
 	sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
193
-#define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
193
+# define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
194 194
 
195 195
 struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
196 196
 	uint32_t bpf_fd;
@@ -198,9 +198,9 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
198 198
 	uint64_t ATTRIBUTE_ALIGNED(8) info;
199 199
 };
200 200
 
201
-#define BPF_OBJ_GET_INFO_BY_FD_struct_size \
201
+# define BPF_OBJ_GET_INFO_BY_FD_struct_size \
202 202
 	sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
203
-#define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
203
+# define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
204 204
 
205 205
 struct BPF_PROG_QUERY_struct /* query */ {
206 206
 	uint32_t target_fd;
@@ -211,18 +211,18 @@ struct BPF_PROG_QUERY_struct /* query */ {
211 211
 	uint32_t prog_cnt;
212 212
 };
213 213
 
214
-#define BPF_PROG_QUERY_struct_size \
214
+# define BPF_PROG_QUERY_struct_size \
215 215
 	offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
216
-#define expected_BPF_PROG_QUERY_struct_size 28
216
+# define expected_BPF_PROG_QUERY_struct_size 28
217 217
 
218 218
 struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
219 219
 	uint64_t ATTRIBUTE_ALIGNED(8) name;
220 220
 	uint32_t prog_fd;
221 221
 };
222 222
 
223
-#define BPF_RAW_TRACEPOINT_OPEN_struct_size \
223
+# define BPF_RAW_TRACEPOINT_OPEN_struct_size \
224 224
 	offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
225
-#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
225
+# define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
226 226
 
227 227
 struct bpf_map_info_struct {
228 228
 	uint32_t type;
@@ -241,9 +241,9 @@ struct bpf_map_info_struct {
241 241
 	uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
242 242
 };
243 243
 
244
-#define bpf_map_info_struct_size \
244
+# define bpf_map_info_struct_size \
245 245
 	sizeof(struct bpf_map_info_struct)
246
-#define expected_bpf_map_info_struct_size 64
246
+# define expected_bpf_map_info_struct_size 64
247 247
 
248 248
 struct bpf_prog_info_struct {
249 249
 	uint32_t type;
@@ -267,8 +267,8 @@ struct bpf_prog_info_struct {
267 267
 	uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
268 268
 };
269 269
 
270
-#define bpf_prog_info_struct_size \
270
+# define bpf_prog_info_struct_size \
271 271
 	sizeof(struct bpf_prog_info_struct)
272
-#define expected_bpf_prog_info_struct_size 104
272
+# define expected_bpf_prog_info_struct_size 104
273 273
 
274 274
 #endif /* !STRACE_BPF_ATTR_H */

+ 1
- 1
bpf_filter.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_BPF_FILTER_H
11
-#define STRACE_BPF_FILTER_H
11
+# define STRACE_BPF_FILTER_H
12 12
 
13 13
 struct bpf_filter_block {
14 14
 	uint16_t code;

+ 1
- 1
bpf_fprog.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_BPF_FPROG_H
9
-#define STRACE_BPF_FPROG_H
9
+# define STRACE_BPF_FPROG_H
10 10
 
11 11
 struct bpf_fprog {
12 12
 	unsigned short len;

+ 68
- 68
btrfs.c View File

@@ -10,10 +10,10 @@
10 10
 
11 11
 #ifdef HAVE_LINUX_BTRFS_H
12 12
 
13
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
14
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
15
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
16
-#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
13
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
14
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
15
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
16
+# include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
17 17
 
18 18
 # include <linux/btrfs.h>
19 19
 
@@ -32,8 +32,8 @@ typedef struct btrfs_ioctl_vol_args_v2
32 32
 
33 33
 #ifdef HAVE_LINUX_BTRFS_H
34 34
 
35
-#include "print_fields.h"
36
-#include <linux/fs.h>
35
+# include "print_fields.h"
36
+# include <linux/fs.h>
37 37
 
38 38
 /*
39 39
  * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
@@ -41,15 +41,15 @@ typedef struct btrfs_ioctl_vol_args_v2
41 41
  */
42 42
 typedef __u64 u64;
43 43
 
44
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
44
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
45 45
 struct btrfs_ioctl_feature_flags {
46 46
 	uint64_t compat_flags;
47 47
 	uint64_t compat_ro_flags;
48 48
 	uint64_t incompat_flags;
49 49
 };
50
-#endif
50
+# endif
51 51
 
52
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
52
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
53 53
 struct btrfs_ioctl_defrag_range_args {
54 54
 	uint64_t start;
55 55
 	uint64_t len;
@@ -58,37 +58,37 @@ struct btrfs_ioctl_defrag_range_args {
58 58
 	uint32_t compress_type;
59 59
 	uint32_t unused[4];
60 60
 };
61
-#endif
61
+# endif
62 62
 
63
-#ifndef BTRFS_LABEL_SIZE
64
-# define BTRFS_LABEL_SIZE 256
65
-#endif
63
+# ifndef BTRFS_LABEL_SIZE
64
+#  define BTRFS_LABEL_SIZE 256
65
+# endif
66 66
 
67
-#ifndef BTRFS_IOC_QUOTA_RESCAN
67
+# ifndef BTRFS_IOC_QUOTA_RESCAN
68 68
 struct btrfs_ioctl_quota_rescan_args {
69 69
 	uint64_t flags, progress, reserved[6];
70 70
 };
71
-# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
71
+#  define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
72 72
 					struct btrfs_ioctl_quota_rescan_args)
73
-# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
73
+#  define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
74 74
 					struct btrfs_ioctl_quota_rescan_args)
75
-#endif
75
+# endif
76 76
 
77
-#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
78
-# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
79
-#endif
77
+# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
78
+#  define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
79
+# endif
80 80
 
81
-#ifndef BTRFS_IOC_GET_FEATURES
82
-# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
81
+# ifndef BTRFS_IOC_GET_FEATURES
82
+#  define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
83 83
 					struct btrfs_ioctl_feature_flags)
84
-# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
84
+#  define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
85 85
 					struct btrfs_ioctl_feature_flags[2])
86
-# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
86
+#  define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
87 87
 					struct btrfs_ioctl_feature_flags[3])
88
-#endif
88
+# endif
89 89
 
90
-#ifndef BTRFS_IOC_TREE_SEARCH_V2
91
-# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
90
+# ifndef BTRFS_IOC_TREE_SEARCH_V2
91
+#  define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
92 92
 					struct btrfs_ioctl_search_args_v2)
93 93
 struct btrfs_ioctl_search_args_v2 {
94 94
 	struct btrfs_ioctl_search_key key; /* in/out - search parameters */
@@ -97,34 +97,34 @@ struct btrfs_ioctl_search_args_v2 {
97 97
 					    *       to store item */
98 98
 	uint64_t buf[0];		   /* out - found items */
99 99
 };
100
-#endif
101
-
102
-#include "xlat/btrfs_balance_args.h"
103
-#include "xlat/btrfs_balance_ctl_cmds.h"
104
-#include "xlat/btrfs_balance_flags.h"
105
-#include "xlat/btrfs_balance_state.h"
106
-#include "xlat/btrfs_compress_types.h"
107
-#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
108
-#include "xlat/btrfs_defrag_flags.h"
109
-#include "xlat/btrfs_dev_replace_cmds.h"
110
-#include "xlat/btrfs_dev_replace_results.h"
111
-#include "xlat/btrfs_dev_replace_state.h"
112
-#include "xlat/btrfs_dev_stats_flags.h"
113
-#include "xlat/btrfs_dev_stats_values.h"
114
-#include "xlat/btrfs_features_compat.h"
115
-#include "xlat/btrfs_features_compat_ro.h"
116
-#include "xlat/btrfs_features_incompat.h"
117
-#include "xlat/btrfs_key_types.h"
118
-#include "xlat/btrfs_logical_ino_args_flags.h"
119
-#include "xlat/btrfs_qgroup_ctl_cmds.h"
120
-#include "xlat/btrfs_qgroup_inherit_flags.h"
121
-#include "xlat/btrfs_qgroup_limit_flags.h"
122
-#include "xlat/btrfs_qgroup_status_flags.h"
123
-#include "xlat/btrfs_scrub_flags.h"
124
-#include "xlat/btrfs_send_flags.h"
125
-#include "xlat/btrfs_snap_flags_v2.h"
126
-#include "xlat/btrfs_space_info_flags.h"
127
-#include "xlat/btrfs_tree_objectids.h"
100
+# endif
101
+
102
+# include "xlat/btrfs_balance_args.h"
103
+# include "xlat/btrfs_balance_ctl_cmds.h"
104
+# include "xlat/btrfs_balance_flags.h"
105
+# include "xlat/btrfs_balance_state.h"
106
+# include "xlat/btrfs_compress_types.h"
107
+# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
108
+# include "xlat/btrfs_defrag_flags.h"
109
+# include "xlat/btrfs_dev_replace_cmds.h"
110
+# include "xlat/btrfs_dev_replace_results.h"
111
+# include "xlat/btrfs_dev_replace_state.h"
112
+# include "xlat/btrfs_dev_stats_flags.h"
113
+# include "xlat/btrfs_dev_stats_values.h"
114
+# include "xlat/btrfs_features_compat.h"
115
+# include "xlat/btrfs_features_compat_ro.h"
116
+# include "xlat/btrfs_features_incompat.h"
117
+# include "xlat/btrfs_key_types.h"
118
+# include "xlat/btrfs_logical_ino_args_flags.h"
119
+# include "xlat/btrfs_qgroup_ctl_cmds.h"
120
+# include "xlat/btrfs_qgroup_inherit_flags.h"
121
+# include "xlat/btrfs_qgroup_limit_flags.h"
122
+# include "xlat/btrfs_qgroup_status_flags.h"
123
+# include "xlat/btrfs_scrub_flags.h"
124
+# include "xlat/btrfs_send_flags.h"
125
+# include "xlat/btrfs_snap_flags_v2.h"
126
+# include "xlat/btrfs_space_info_flags.h"
127
+# include "xlat/btrfs_tree_objectids.h"
128 128
 
129 129
 static inline char
130 130
 prnibble(char v)
@@ -135,7 +135,7 @@ prnibble(char v)
135 135
 }
136 136
 
137 137
 /* 8-4-4-4-12 = 36 characters */
138
-#define UUID_STRING_SIZE 36
138
+# define UUID_STRING_SIZE 36
139 139
 
140 140
 /* Formats uuid, returns 0 if it's all zeroes */
141 141
 static int
@@ -222,9 +222,9 @@ btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
222 222
 	tprints("}");
223 223
 }
224 224
 
225
-#define btrfs_print_key_type(prefix_, where_, field_) \
225
+# define btrfs_print_key_type(prefix_, where_, field_) \
226 226
 	PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
227
-#define btrfs_print_objectid(prefix_, where_, field_) \
227
+# define btrfs_print_objectid(prefix_, where_, field_) \
228 228
 	PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
229 229
 			   NULL)
230 230
 
@@ -718,9 +718,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
718 718
 		struct btrfs_ioctl_fs_info_args args;
719 719
 		char uuid[UUID_STRING_SIZE+1];
720 720
 		uint32_t nodesize, sectorsize, clone_alignment;
721
-#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
721
+# ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
722 722
 		uint32_t *reserved32;
723
-#endif
723
+# endif
724 724
 
725 725
 		if (entering(tcp))
726 726
 			return 0;
@@ -729,16 +729,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
729 729
 		if (umove_or_printaddr(tcp, arg, &args))
730 730
 			break;
731 731
 
732
-#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
732
+# ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
733 733
 		nodesize = args.nodesize,
734 734
 		sectorsize = args.sectorsize,
735 735
 		clone_alignment = args.clone_alignment;
736
-#else
736
+# else
737 737
 		reserved32 = (void *) args.reserved;
738 738
 		nodesize = reserved32[0];
739 739
 		sectorsize = reserved32[1];
740 740
 		clone_alignment = reserved32[2];
741
-#endif
741
+# endif
742 742
 		btrfs_unparse_uuid(args.fsid, uuid);
743 743
 
744 744
 		PRINT_FIELD_U("{", args, max_id);
@@ -892,11 +892,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
892 892
 
893 893
 			tprintf(", flags=");
894 894
 			printflags64(btrfs_logical_ino_args_flags,
895
-#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
895
+# ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
896 896
 				     args.flags
897
-#else
897
+# else
898 898
 				     args.reserved[3]
899
-#endif
899
+# endif
900 900
 				     , "BTRFS_LOGICAL_INO_ARGS_???");
901 901
 			PRINT_FIELD_ADDR64(", ", args, inodes);
902 902
 			tprints("}");
@@ -1262,9 +1262,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
1262 1262
 
1263 1263
 	case BTRFS_IOC_CLONE:			/* FICLONE */
1264 1264
 	case BTRFS_IOC_CLONE_RANGE:		/* FICLONERANGE */
1265
-#ifdef BTRFS_IOC_FILE_EXTENT_SAME
1265
+# ifdef BTRFS_IOC_FILE_EXTENT_SAME
1266 1266
 	case BTRFS_IOC_FILE_EXTENT_SAME:	/* FIDEDUPERANGE */
1267
-#endif
1267
+# endif
1268 1268
 		/*
1269 1269
 		 * FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
1270 1270
 		 * btrfs ioctls and the code was kept for the generic

+ 14
- 14
cacheflush.c View File

@@ -20,15 +20,15 @@
20 20
 # include "xlat/cacheflush_scope.h"
21 21
 
22 22
 static const struct xlat cacheflush_flags[] = {
23
-#ifdef FLUSH_CACHE_BOTH
23
+# ifdef FLUSH_CACHE_BOTH
24 24
 	XLAT(FLUSH_CACHE_BOTH),
25
-#endif
26
-#ifdef FLUSH_CACHE_DATA
25
+# endif
26
+# ifdef FLUSH_CACHE_DATA
27 27
 	XLAT(FLUSH_CACHE_DATA),
28
-#endif
29
-#ifdef FLUSH_CACHE_INSN
28
+# endif
29
+# ifdef FLUSH_CACHE_INSN
30 30
 	XLAT(FLUSH_CACHE_INSN),
31
-#endif
31
+# endif
32 32
 	XLAT_END
33 33
 };
34 34
 
@@ -72,18 +72,18 @@ SYS_FUNC(cacheflush)
72 72
 
73 73
 #ifdef SH
74 74
 static const struct xlat cacheflush_flags[] = {
75
-#ifdef CACHEFLUSH_D_INVAL
75
+# ifdef CACHEFLUSH_D_INVAL
76 76
 	XLAT(CACHEFLUSH_D_INVAL),
77
-#endif
78
-#ifdef CACHEFLUSH_D_WB
77
+# endif
78
+# ifdef CACHEFLUSH_D_WB
79 79
 	XLAT(CACHEFLUSH_D_WB),
80
-#endif
81
-#ifdef CACHEFLUSH_D_PURGE
80
+# endif
81
+# ifdef CACHEFLUSH_D_PURGE
82 82
 	XLAT(CACHEFLUSH_D_PURGE),
83
-#endif
84
-#ifdef CACHEFLUSH_I
83
+# endif
84
+# ifdef CACHEFLUSH_I
85 85
 	XLAT(CACHEFLUSH_I),
86
-#endif
86
+# endif
87 87
 	XLAT_END
88 88
 };
89 89
 

+ 300
- 300
defs.h
File diff suppressed because it is too large
View File


+ 1
- 1
delay.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_DELAY_H
9
-#define STRACE_DELAY_H
9
+# define STRACE_DELAY_H
10 10
 
11 11
 uint16_t alloc_delay_data(void);
12 12
 void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);

+ 1
- 1
dm.c View File

@@ -98,7 +98,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
98 98
 	}
99 99
 }
100 100
 
101
-#include "xlat/dm_flags.h"
101
+#  include "xlat/dm_flags.h"
102 102
 
103 103
 static void
104 104
 dm_decode_flags(const struct dm_ioctl *ioc)

+ 11
- 11
error_prints.h View File

@@ -11,11 +11,11 @@
11 11
  */
12 12
 
13 13
 #ifndef STRACE_ERROR_PRINTS_H
14
-#define STRACE_ERROR_PRINTS_H
14
+# define STRACE_ERROR_PRINTS_H
15 15
 
16
-#include <stdbool.h>
16
+# include <stdbool.h>
17 17
 
18
-#include "gcc_compat.h"
18
+# include "gcc_compat.h"
19 19
 
20 20
 extern bool debug_flag;
21 21
 
@@ -31,29 +31,29 @@ void error_msg_and_die(const char *fmt, ...)
31 31
 	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
32 32
 
33 33
 /* Wrappers for if (debug_flag) error_msg(...) */
34
-#define debug_msg(...) \
34
+# define debug_msg(...) \
35 35
 	do { \
36 36
 		if (debug_flag) \
37 37
 			error_msg(__VA_ARGS__); \
38 38
 	} while (0)
39
-#define debug_perror_msg(...) \
39
+# define debug_perror_msg(...) \
40 40
 	do { \
41 41
 		if (debug_flag) \
42 42
 			perror_msg(__VA_ARGS__); \
43 43
 	} while (0)
44 44
 
45 45
 /* Simple wrappers for providing function name in error messages */
46
-#define error_func_msg(fmt_, ...) \
46
+# define error_func_msg(fmt_, ...) \
47 47
 	error_msg("%s: " fmt_,  __func__, ##__VA_ARGS__)
48
-#define perror_func_msg(fmt_, ...) \
48
+# define perror_func_msg(fmt_, ...) \
49 49
 	perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
50
-#define debug_func_msg(fmt_, ...) \
50
+# define debug_func_msg(fmt_, ...) \
51 51
 	debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
52
-#define debug_func_perror_msg(fmt_, ...) \
52
+# define debug_func_perror_msg(fmt_, ...) \
53 53
 	debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
54
-#define error_func_msg_and_die(fmt_, ...) \
54
+# define error_func_msg_and_die(fmt_, ...) \
55 55
 	error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
56
-#define perror_func_msg_and_die(fmt_, ...) \
56
+# define perror_func_msg_and_die(fmt_, ...) \
57 57
 	perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
58 58
 
59 59
 #endif /* !STRACE_ERROR_PRINTS_H */

+ 1
- 1
evdev.c View File

@@ -186,7 +186,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
186 186
 	return RVAL_IOCTL_DECODED;
187 187
 }
188 188
 
189
-#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
189
+# define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
190 190
 	decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
191 191
 		       (dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
192 192
 

+ 1
- 1
evdev_mpers.c View File

@@ -11,7 +11,7 @@
11 11
 
12 12
 #ifdef HAVE_LINUX_INPUT_H
13 13
 
14
-#include DEF_MPERS_TYPE(struct_ff_effect)
14
+# include DEF_MPERS_TYPE(struct_ff_effect)
15 15
 
16 16
 # include <linux/ioctl.h>
17 17
 # include <linux/input.h>

+ 7
- 7
f_owner_ex.h View File

@@ -6,16 +6,16 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_F_OWNER_EX_H
9
-#define STRACE_F_OWNER_EX_H
9
+# define STRACE_F_OWNER_EX_H
10 10
 
11
-#include <linux/fcntl.h>
11
+# include <linux/fcntl.h>
12 12
 
13
-#if defined HAVE_STRUCT_F_OWNER_EX
13
+# if defined HAVE_STRUCT_F_OWNER_EX
14 14
 typedef struct f_owner_ex struct_kernel_f_owner_ex;
15
-#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
15
+# elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
16 16
 typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
17
-#else
18
-# error struct f_owner_ex definition not found in <linux/fcntl.h>
19
-#endif
17
+# else
18
+#  error struct f_owner_ex definition not found in <linux/fcntl.h>
19
+# endif
20 20
 
21 21
 #endif /* !STRACE_F_OWNER_EX_H */

+ 1
- 1
filter.h View File

@@ -7,7 +7,7 @@
7 7
  */
8 8
 
9 9
 #ifndef STRACE_FILTER_H
10
-#define STRACE_FILTER_H
10
+# define STRACE_FILTER_H
11 11
 
12 12
 struct number_set;
13 13
 typedef int (*string_to_uint_func)(const char *);

+ 12
- 12
flock.h View File

@@ -7,24 +7,24 @@
7 7
  */
8 8
 
9 9
 #ifndef STRACE_FLOCK_H
10
-#define STRACE_FLOCK_H
10
+# define STRACE_FLOCK_H
11 11
 
12
-#include <linux/fcntl.h>
12
+# include <linux/fcntl.h>
13 13
 
14
-#if defined HAVE_STRUCT_FLOCK
14
+# if defined HAVE_STRUCT_FLOCK
15 15
 typedef struct flock struct_kernel_flock;
16
-#elif defined HAVE_STRUCT___KERNEL_FLOCK
16
+# elif defined HAVE_STRUCT___KERNEL_FLOCK
17 17
 typedef struct __kernel_flock struct_kernel_flock;
18
-#else
19
-# error struct flock definition not found in <linux/fcntl.h>
20
-#endif
18
+# else
19
+#  error struct flock definition not found in <linux/fcntl.h>
20
+# endif
21 21
 
22
-#if defined HAVE_STRUCT_FLOCK64
22
+# if defined HAVE_STRUCT_FLOCK64
23 23
 typedef struct flock64 struct_kernel_flock64;
24
-#elif defined HAVE_STRUCT___KERNEL_FLOCK64
24
+# elif defined HAVE_STRUCT___KERNEL_FLOCK64
25 25
 typedef struct __kernel_flock64 struct_kernel_flock64;
26
-#else
27
-# error struct flock64 definition not found in <linux/fcntl.h>
28
-#endif
26
+# else
27
+#  error struct flock64 definition not found in <linux/fcntl.h>
28
+# endif
29 29
 
30 30
 #endif /* !STRACE_FLOCK_H */

+ 94
- 94
gcc_compat.h View File

@@ -7,114 +7,114 @@
7 7
  */
8 8
 
9 9
 #ifndef STRACE_GCC_COMPAT_H
10
-#define STRACE_GCC_COMPAT_H
10
+# define STRACE_GCC_COMPAT_H
11 11
 
12
-#if defined __GNUC__ && defined __GNUC_MINOR__
13
-# define GNUC_PREREQ(maj, min)	\
12
+# if defined __GNUC__ && defined __GNUC_MINOR__
13
+#  define GNUC_PREREQ(maj, min)	\
14 14
 	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
15
-#else
16
-# define GNUC_PREREQ(maj, min)	0
17
-#endif
15
+# else
16
+#  define GNUC_PREREQ(maj, min)	0
17
+# endif
18 18
 
19
-#if defined __clang__ && defined __clang_major__ && defined __clang_minor__
20
-# define CLANG_PREREQ(maj, min)	\
19
+# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
20
+#  define CLANG_PREREQ(maj, min)	\
21 21
 	((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
22
-#else
23
-# define CLANG_PREREQ(maj, min)	0
24
-#endif
25
-
26
-#if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
27
-# define __attribute__(x)	/* empty */
28
-#endif
29
-
30
-#if GNUC_PREREQ(2, 5)
31
-# define ATTRIBUTE_NORETURN	__attribute__((__noreturn__))
32
-#else
33
-# define ATTRIBUTE_NORETURN	/* empty */
34
-#endif
35
-
36
-#if GNUC_PREREQ(2, 7)
37
-# define ATTRIBUTE_FORMAT(args)	__attribute__((__format__ args))
38
-# define ATTRIBUTE_ALIGNED(arg)	__attribute__((__aligned__(arg)))
39
-# define ATTRIBUTE_PACKED	__attribute__((__packed__))
40
-#else
41
-# define ATTRIBUTE_FORMAT(args)	/* empty */
42
-# define ATTRIBUTE_ALIGNED(arg)	/* empty */
43
-# define ATTRIBUTE_PACKED	/* empty */
44
-#endif
45
-
46
-#if GNUC_PREREQ(3, 0)
47
-# define SAME_TYPE(x, y)	__builtin_types_compatible_p(typeof(x), typeof(y))
48
-# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
22
+# else
23
+#  define CLANG_PREREQ(maj, min)	0
24
+# endif
25
+
26
+# if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
27
+#  define __attribute__(x)	/* empty */
28
+# endif
29
+
30
+# if GNUC_PREREQ(2, 5)
31
+#  define ATTRIBUTE_NORETURN	__attribute__((__noreturn__))
32
+# else
33
+#  define ATTRIBUTE_NORETURN	/* empty */
34
+# endif
35
+
36
+# if GNUC_PREREQ(2, 7)
37
+#  define ATTRIBUTE_FORMAT(args)	__attribute__((__format__ args))
38
+#  define ATTRIBUTE_ALIGNED(arg)	__attribute__((__aligned__(arg)))
39
+#  define ATTRIBUTE_PACKED	__attribute__((__packed__))
40
+# else
41
+#  define ATTRIBUTE_FORMAT(args)	/* empty */
42
+#  define ATTRIBUTE_ALIGNED(arg)	/* empty */
43
+#  define ATTRIBUTE_PACKED	/* empty */
44
+# endif
45
+
46
+# if GNUC_PREREQ(3, 0)
47
+#  define SAME_TYPE(x, y)	__builtin_types_compatible_p(typeof(x), typeof(y))
48
+#  define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
49 49
 /* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
50
-# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
51
-#else
52
-# define SAME_TYPE(x, y)	0
53
-# define MUST_BE_ARRAY(a)	0
54
-#endif
55
-
56
-#if GNUC_PREREQ(3, 0)
57
-# define ATTRIBUTE_MALLOC	__attribute__((__malloc__))
58
-#else
59
-# define ATTRIBUTE_MALLOC	/* empty */
60
-#endif
61
-
62
-#if GNUC_PREREQ(3, 1)
63
-# define ATTRIBUTE_NOINLINE	__attribute__((__noinline__))
64
-#else
65
-# define ATTRIBUTE_NOINLINE	/* empty */
66
-#endif
67
-
68
-#if GNUC_PREREQ(4, 0)
69
-# define ATTRIBUTE_SENTINEL	__attribute__((__sentinel__))
70
-#else
71
-# define ATTRIBUTE_SENTINEL	/* empty */
72
-#endif
73
-
74
-#if GNUC_PREREQ(4, 1)
75
-# define ALIGNOF(t_)	__alignof__(t_)
76
-#else
77
-# define ALIGNOF(t_)	(sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
78
-#endif
79
-
80
-#if GNUC_PREREQ(4, 3)
81
-# define ATTRIBUTE_ALLOC_SIZE(args)	__attribute__((__alloc_size__ args))
82
-#else
83
-# define ATTRIBUTE_ALLOC_SIZE(args)	/* empty */
84
-#endif
85
-
86
-#if GNUC_PREREQ(7, 0)
87
-# define ATTRIBUTE_FALLTHROUGH	__attribute__((__fallthrough__))
88
-#else
89
-# define ATTRIBUTE_FALLTHROUGH	((void) 0)
90
-#endif
91
-
92
-#if CLANG_PREREQ(2, 8)
93
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT					\
50
+#  define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
51
+# else
52
+#  define SAME_TYPE(x, y)	0
53
+#  define MUST_BE_ARRAY(a)	0
54
+# endif
55
+
56
+# if GNUC_PREREQ(3, 0)
57
+#  define ATTRIBUTE_MALLOC	__attribute__((__malloc__))
58
+# else
59
+#  define ATTRIBUTE_MALLOC	/* empty */
60
+# endif
61
+
62
+# if GNUC_PREREQ(3, 1)
63
+#  define ATTRIBUTE_NOINLINE	__attribute__((__noinline__))
64
+# else
65
+#  define ATTRIBUTE_NOINLINE	/* empty */
66
+# endif
67
+
68
+# if GNUC_PREREQ(4, 0)
69
+#  define ATTRIBUTE_SENTINEL	__attribute__((__sentinel__))
70
+# else
71
+#  define ATTRIBUTE_SENTINEL	/* empty */
72
+# endif
73
+
74
+# if GNUC_PREREQ(4, 1)
75
+#  define ALIGNOF(t_)	__alignof__(t_)
76
+# else
77
+#  define ALIGNOF(t_)	(sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
78
+# endif
79
+
80
+# if GNUC_PREREQ(4, 3)
81
+#  define ATTRIBUTE_ALLOC_SIZE(args)	__attribute__((__alloc_size__ args))
82
+# else
83
+#  define ATTRIBUTE_ALLOC_SIZE(args)	/* empty */
84
+# endif
85
+
86
+# if GNUC_PREREQ(7, 0)
87
+#  define ATTRIBUTE_FALLTHROUGH	__attribute__((__fallthrough__))
88
+# else
89
+#  define ATTRIBUTE_FALLTHROUGH	((void) 0)
90
+# endif
91
+
92
+# if CLANG_PREREQ(2, 8)
93
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT					\
94 94
 	_Pragma("clang diagnostic push");				\
95 95
 	_Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
96
-# define DIAG_POP_IGNORE_OVERRIDE_INIT					\
96
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT					\
97 97
 	_Pragma("clang diagnostic pop");
98
-#elif GNUC_PREREQ(4, 2)
99
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT					\
98
+# elif GNUC_PREREQ(4, 2)
99
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT					\
100 100
 	_Pragma("GCC diagnostic push");					\
101 101
 	_Pragma("GCC diagnostic ignored \"-Woverride-init\"");
102
-# define DIAG_POP_IGNORE_OVERRIDE_INIT					\
102
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT					\
103 103
 	_Pragma("GCC diagnostic pop");
104
-#else
105
-# define DIAG_PUSH_IGNORE_OVERRIDE_INIT	/* empty */
106
-# define DIAG_POP_IGNORE_OVERRIDE_INIT	/* empty */
107
-#endif
104
+# else
105
+#  define DIAG_PUSH_IGNORE_OVERRIDE_INIT	/* empty */
106
+#  define DIAG_POP_IGNORE_OVERRIDE_INIT	/* empty */
107
+# endif
108 108
 
109
-#if GNUC_PREREQ(6, 0)
110
-# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE				\
109
+# if GNUC_PREREQ(6, 0)
110
+#  define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE				\
111 111
 	_Pragma("GCC diagnostic push");					\
112 112
 	_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
113
-# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE				\
113
+#  define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE				\
114 114
 	_Pragma("GCC diagnostic pop");
115
-#else
116
-# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE	/* empty */
117
-# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE	/* empty */
118
-#endif
115
+# else
116
+#  define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE	/* empty */
117
+#  define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE	/* empty */
118
+# endif
119 119
 
120 120
 #endif /* !STRACE_GCC_COMPAT_H */

+ 2
- 2
get_personality.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_GET_PERSONALITY_H
9
-#define STRACE_GET_PERSONALITY_H
9
+# define STRACE_GET_PERSONALITY_H
10 10
 
11
-#include "ptrace.h"
11
+# include "ptrace.h"
12 12
 
13 13
 extern int
14 14
 get_personality_from_syscall_info(const struct ptrace_syscall_info *);

+ 11
- 11
ipc_defs.h View File

@@ -7,21 +7,21 @@
7 7
  */
8 8
 
9 9
 #ifndef STRACE_IPC_DEFS_H
10
-#define STRACE_IPC_DEFS_H
10
+# define STRACE_IPC_DEFS_H
11 11
 
12
-#ifdef HAVE_SYS_IPC_H
13
-# include <sys/ipc.h>
14
-#elif defined HAVE_LINUX_IPC_H
15
-# include <linux/ipc.h>
12
+# ifdef HAVE_SYS_IPC_H
13
+#  include <sys/ipc.h>
14
+# elif defined HAVE_LINUX_IPC_H
15
+#  include <linux/ipc.h>
16 16
 /* While glibc uses __key, the kernel uses key. */
17
-# define __key key
18
-#endif
17
+#  define __key key
18
+# endif
19 19
 
20
-#if !defined IPC_64
21
-# define IPC_64 0x100
22
-#endif
20
+# if !defined IPC_64
21
+#  define IPC_64 0x100
22
+# endif
23 23
 
24
-#define PRINTCTL(flagset, arg, dflt)				\
24
+# define PRINTCTL(flagset, arg, dflt)				\
25 25
 	do {							\
26 26
 		if ((arg) & IPC_64) {				\
27 27
 			print_xlat(IPC_64);			\

+ 20
- 20
kernel_types.h View File

@@ -7,11 +7,11 @@
7 7
  */
8 8
 
9 9
 #ifndef STRACE_KERNEL_TYPES_H
10
-#define STRACE_KERNEL_TYPES_H
10
+# define STRACE_KERNEL_TYPES_H
11 11
 
12 12
 # if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
13 13
 
14
-# include <asm/posix_types.h>
14
+#  include <asm/posix_types.h>
15 15
 
16 16
 typedef __kernel_long_t kernel_long_t;
17 17
 typedef __kernel_ulong_t kernel_ulong_t;
@@ -35,15 +35,15 @@ typedef struct {
35 35
 	char		d_name[1];
36 36
 } kernel_dirent;
37 37
 
38
-#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
39
-# define PRI_kl "ll"
40
-#else
41
-# define PRI_kl "l"
42
-#endif
38
+# if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
39
+#  define PRI_kl "ll"
40
+# else
41
+#  define PRI_kl "l"
42
+# endif
43 43
 
44
-#define PRI_kld PRI_kl"d"
45
-#define PRI_klu PRI_kl"u"
46
-#define PRI_klx PRI_kl"x"
44
+# define PRI_kld PRI_kl"d"
45
+# define PRI_klu PRI_kl"u"
46
+# define PRI_klx PRI_kl"x"
47 47
 
48 48
 /*
49 49
  * The kernel used to define 64-bit types on 64-bit systems on a per-arch
@@ -54,17 +54,17 @@ typedef struct {
54 54
  * every printing of __u64 or __s64 to stdint types.
55 55
  * The exception is Android, where for MIPS64 unsigned long long is used.
56 56
  */
57
-#if SIZEOF_LONG == 4
58
-# define PRI__64 "ll"
59
-#elif defined ALPHA || defined IA64 || defined __powerpc64__ \
57
+# if SIZEOF_LONG == 4
58
+#  define PRI__64 "ll"
59
+# elif defined ALPHA || defined IA64 || defined __powerpc64__ \
60 60
       || (defined MIPS && !defined __ANDROID__)
61
-# define PRI__64 "l"
62
-#else
63
-# define PRI__64 "ll"
64
-#endif
61
+#  define PRI__64 "l"
62
+# else
63
+#  define PRI__64 "ll"
64
+# endif
65 65
 
66
-#define PRI__d64 PRI__64"d"
67
-#define PRI__u64 PRI__64"u"
68
-#define PRI__x64 PRI__64"x"
66
+# define PRI__d64 PRI__64"d"
67
+# define PRI__u64 PRI__64"u"
68
+# define PRI__x64 PRI__64"x"
69 69
 
70 70
 #endif /* !STRACE_KERNEL_TYPES_H */

+ 5
- 5
keyctl_kdf_params.h View File

@@ -6,16 +6,16 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_KEYCTL_KDF_PARAMS_H
9
-#define STRACE_KEYCTL_KDF_PARAMS_H
9
+# define STRACE_KEYCTL_KDF_PARAMS_H
10 10
 
11
-#include <stdint.h>
12
-#include "kernel_types.h"
11
+# include <stdint.h>
12
+# include "kernel_types.h"
13 13
 
14 14
 /* from include/linux/crypto.h */
15
-#define CRYPTO_MAX_ALG_NAME		128
15
+# define CRYPTO_MAX_ALG_NAME		128
16 16
 
17 17
 /* from security/keys/internal.h */
18
-#define KEYCTL_KDF_MAX_OI_LEN		64      /* max length of otherinfo */
18
+# define KEYCTL_KDF_MAX_OI_LEN		64      /* max length of otherinfo */
19 19
 
20 20
 struct keyctl_kdf_params {
21 21
 	char *hashname;

+ 4
- 4
kill_save_errno.h View File

@@ -6,11 +6,11 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_KILL_SAVE_ERRNO_H
9
-#define STRACE_KILL_SAVE_ERRNO_H
9
+# define STRACE_KILL_SAVE_ERRNO_H
10 10
 
11
-#include <sys/types.h>
12
-#include <signal.h>
13
-#include <errno.h>
11
+# include <sys/types.h>
12
+# include <signal.h>
13
+# include <errno.h>
14 14
 
15 15
 static inline int
16 16
 kill_save_errno(pid_t pid, int sig)

+ 1
- 1
kvm.c View File

@@ -107,7 +107,7 @@ map_len(struct mmap_cache_entry_t *map_info)
107 107
 		: 0;
108 108
 }
109 109
 
110
-#define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
110
+# define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
111 111
 
112 112
 static struct vcpu_info*
113 113
 vcpu_get_info(struct tcb *const tcp, int fd)

+ 20
- 20
largefile_wrappers.h View File

@@ -9,30 +9,30 @@
9 9
  */
10 10
 
11 11
 #ifndef STRACE_LARGEFILE_WRAPPERS_H
12
-#define STRACE_LARGEFILE_WRAPPERS_H
12
+# define STRACE_LARGEFILE_WRAPPERS_H
13 13
 
14
-#include "defs.h"
14
+# include "defs.h"
15 15
 
16
-#ifdef _LARGEFILE64_SOURCE
17
-# ifdef HAVE_FOPEN64
18
-#  define fopen_stream fopen64
16
+# ifdef _LARGEFILE64_SOURCE
17
+#  ifdef HAVE_FOPEN64
18
+#   define fopen_stream fopen64
19
+#  else
20
+#   define fopen_stream fopen
21
+#  endif
22
+#  define struct_stat struct stat64
23
+#  define stat_file stat64
24
+#  define struct_dirent struct dirent64
25
+#  define read_dir readdir64
26
+#  define struct_rlimit struct rlimit64
27
+#  define set_rlimit setrlimit64
19 28
 # else
20 29
 #  define fopen_stream fopen
30
+#  define struct_stat struct stat
31
+#  define stat_file stat
32
+#  define struct_dirent struct dirent
33
+#  define read_dir readdir
34
+#  define struct_rlimit struct rlimit
35
+#  define set_rlimit setrlimit
21 36
 # endif
22
-# define struct_stat struct stat64
23
-# define stat_file stat64
24
-# define struct_dirent struct dirent64
25
-# define read_dir readdir64
26
-# define struct_rlimit struct rlimit64
27
-# define set_rlimit setrlimit64
28
-#else
29
-# define fopen_stream fopen
30
-# define struct_stat struct stat
31
-# define stat_file stat
32
-# define struct_dirent struct dirent
33
-# define read_dir readdir
34
-# define struct_rlimit struct rlimit
35
-# define set_rlimit setrlimit
36
-#endif
37 37
 
38 38
 #endif /* STRACE_LARGEFILE_WRAPPERS_H */

+ 1
- 1
linux/aarch64/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/alpha/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/arc/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 4
- 4
linux/arm/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 
@@ -17,7 +17,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
17 17
 {
18 18
 	*err = 0;
19 19
 
20
-#ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
20
+# ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
21 21
 
22 22
 	register kernel_ulong_t rt;
23 23
 	register kernel_ulong_t r0 __asm__("r0");
@@ -26,7 +26,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
26 26
 			     : "r"(nr)
27 27
 			     : "memory");
28 28
 
29
-#else
29
+# else
30 30
 
31 31
 	register kernel_ulong_t r7 __asm__("r7") = nr;
32 32
 	register kernel_ulong_t r0 __asm__("r0");
@@ -35,7 +35,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
35 35
 			     : "r"(r7)
36 36
 			     : "memory");
37 37
 
38
-#endif
38
+# endif
39 39
 
40 40
 	return r0;
41 41
 }

+ 1
- 1
linux/asm_stat.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_ASM_STAT_H
9
-#define STRACE_ASM_STAT_H
9
+# define STRACE_ASM_STAT_H
10 10
 
11 11
 # undef dev_t
12 12
 # undef gid_t

+ 1
- 1
linux/avr32/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/bfin/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/bfin/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	int		sig;

+ 115
- 115
linux/dummy.h View File

@@ -8,140 +8,140 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_LINUX_DUMMY_H
11
-#define STRACE_LINUX_DUMMY_H
11
+# define STRACE_LINUX_DUMMY_H
12 12
 
13
-#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
14
-#define	sys_oldfstat		printargs
15
-#define	sys_oldstat		printargs
16
-#endif
13
+# ifndef HAVE_STRUCT___OLD_KERNEL_STAT
14
+#  define sys_oldfstat		printargs
15
+#  define sys_oldstat		printargs
16
+# endif
17 17
 
18 18
 /* still unfinished */
19
-#define	sys_rseq		printargs
20
-#define	sys_vm86		printargs
21
-#define	sys_vm86old		printargs
19
+# define sys_rseq		printargs
20
+# define sys_vm86		printargs
21
+# define sys_vm86old		printargs
22 22
 
23 23
 /* machine-specific */
24
-#ifndef HAVE_STRUCT_USER_DESC
25
-# define	sys_modify_ldt		printargs
26
-#endif
24
+# ifndef HAVE_STRUCT_USER_DESC
25
+#  define sys_modify_ldt		printargs
26
+# endif
27 27
 
28
-#if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
29
-# define	sys_set_thread_area	printargs
30
-#endif
28
+# if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
29
+#  define sys_set_thread_area	printargs
30
+# endif
31 31
 
32
-#if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
33
-# define	sys_get_thread_area	printargs
34
-#endif
32
+# if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
33
+#  define sys_get_thread_area	printargs
34
+# endif
35 35
 
36
-#ifdef ALPHA
37
-# define	sys_getdtablesize	printargs
38
-#endif
36
+# ifdef ALPHA
37
+#  define sys_getdtablesize	printargs
38
+# endif
39 39
 
40 40
 /* like another call */
41
-#define	sys_acct		sys_chdir
42
-#define	sys_chroot		sys_chdir
43
-#define	sys_clock_getres	sys_clock_gettime
44
-#define	sys_connect		sys_bind
45
-#define	sys_fchdir		sys_close
46
-#define	sys_fdatasync		sys_close
47
-#define	sys_fsync		sys_close
48
-#define	sys_getegid		sys_getuid
49
-#define	sys_getegid16		sys_geteuid16
50
-#define	sys_geteuid		sys_getuid
51
-#define	sys_geteuid16		sys_getuid16
52
-#define	sys_getgid		sys_getuid
53
-#define	sys_getgid16		sys_getuid16
54
-#define	sys_getpeername		sys_getsockname
55
-#define	sys_getresgid		sys_getresuid
56
-#define	sys_getresgid16		sys_getresuid16
57
-#define	sys_lstat		sys_stat
58
-#define	sys_lstat64		sys_stat64
59
-#define	sys_mkdir		sys_chmod
60
-#define	sys_mkdirat		sys_fchmodat
61
-#define	sys_mlock		sys_munmap
62
-#define	sys_mq_unlink		sys_chdir
63
-#define	sys_munlock		sys_munmap
64
-#define	sys_oldlstat		sys_oldstat
65
-#define	sys_pivotroot		sys_link
66
-#define	sys_rename		sys_link
67
-#define	sys_rmdir		sys_chdir
68
-#define	sys_sched_get_priority_max	sys_sched_get_priority_min
69
-#define	sys_set_robust_list	sys_munmap
70
-#define	sys_setdomainname	sys_sethostname
71
-#define	sys_setfsgid		sys_setfsuid
72
-#define	sys_setfsgid16		sys_setfsuid16
73
-#define	sys_setgid		sys_setuid
74
-#define	sys_setgid16		sys_setuid16
75
-#define	sys_setregid		sys_setreuid
76
-#define	sys_setregid16		sys_setreuid16
77
-#define	sys_setresgid		sys_setresuid
78
-#define	sys_setresgid16		sys_setresuid16
79
-#define	sys_stime		sys_time
80
-#define	sys_swapoff		sys_chdir
81
-#define	sys_symlink		sys_link
82
-#define	sys_syncfs		sys_close
83
-#define	sys_umount		sys_chdir
84
-#define	sys_unlink		sys_chdir
85
-#define	sys_uselib		sys_chdir
86
-#define	sys_vfork		sys_fork
41
+# define sys_acct		sys_chdir
42
+# define sys_chroot		sys_chdir
43
+# define sys_clock_getres	sys_clock_gettime
44
+# define sys_connect		sys_bind
45
+# define sys_fchdir		sys_close
46
+# define sys_fdatasync		sys_close
47
+# define sys_fsync		sys_close
48
+# define sys_getegid		sys_getuid
49
+# define sys_getegid16		sys_geteuid16
50
+# define sys_geteuid		sys_getuid
51
+# define sys_geteuid16		sys_getuid16
52
+# define sys_getgid		sys_getuid
53
+# define sys_getgid16		sys_getuid16
54
+# define sys_getpeername		sys_getsockname
55
+# define sys_getresgid		sys_getresuid
56
+# define sys_getresgid16		sys_getresuid16
57
+# define sys_lstat		sys_stat
58
+# define sys_lstat64		sys_stat64
59
+# define sys_mkdir		sys_chmod
60
+# define sys_mkdirat		sys_fchmodat
61
+# define sys_mlock		sys_munmap
62
+# define sys_mq_unlink		sys_chdir
63
+# define sys_munlock		sys_munmap
64
+# define sys_oldlstat		sys_oldstat
65
+# define sys_pivotroot		sys_link
66
+# define sys_rename		sys_link
67
+# define sys_rmdir		sys_chdir
68
+# define sys_sched_get_priority_max	sys_sched_get_priority_min
69
+# define sys_set_robust_list	sys_munmap
70
+# define sys_setdomainname	sys_sethostname
71
+# define sys_setfsgid		sys_setfsuid
72
+# define sys_setfsgid16		sys_setfsuid16
73
+# define sys_setgid		sys_setuid
74
+# define sys_setgid16		sys_setuid16
75
+# define sys_setregid		sys_setreuid
76
+# define sys_setregid16		sys_setreuid16
77
+# define sys_setresgid		sys_setresuid
78
+# define sys_setresgid16		sys_setresuid16
79
+# define sys_stime		sys_time
80
+# define sys_swapoff		sys_chdir
81
+# define sys_symlink		sys_link
82
+# define sys_syncfs		sys_close
83
+# define sys_umount		sys_chdir
84
+# define sys_unlink		sys_chdir
85
+# define sys_uselib		sys_chdir
86
+# define sys_vfork		sys_fork
87 87
 
88 88
 /* printargs does the right thing */
89
-#define	sys_getpgrp		printargs
90
-#define	sys_getpid		printargs
91
-#define	sys_getppid		printargs
92
-#define	sys_gettid		printargs
93
-#define	sys_idle		printargs
94
-#define	sys_inotify_init	printargs
95
-#define	sys_munlockall		printargs
96
-#define	sys_pause		printargs
97
-#define	sys_printargs		printargs
98
-#define	sys_sched_yield		printargs
99
-#define	sys_setsid		printargs
100
-#define	sys_set_tid_address	printargs
101
-#define	sys_setup		printargs
102
-#define	sys_sync		printargs
103
-#define	sys_syscall		printargs
104
-#define	sys_vhangup		printargs
89
+# define sys_getpgrp		printargs
90
+# define sys_getpid		printargs
91
+# define sys_getppid		printargs
92
+# define sys_gettid		printargs
93
+# define sys_idle		printargs
94
+# define sys_inotify_init	printargs
95
+# define sys_munlockall		printargs
96
+# define sys_pause		printargs
97
+# define sys_printargs		printargs
98
+# define sys_sched_yield		printargs
99
+# define sys_setsid		printargs
100
+# define sys_set_tid_address	printargs
101
+# define sys_setup		printargs
102
+# define sys_sync		printargs
103
+# define sys_syscall		printargs
104
+# define sys_vhangup		printargs
105 105
 
106 106
 /* printargs_u does the right thing */
107
-#define	sys_alarm		printargs_u
107
+# define sys_alarm		printargs_u
108 108
 
109 109
 /* printargs_d does the right thing */
110
-#define	sys_exit		printargs_d
111
-#define	sys_getpgid		printargs_d
112
-#define	sys_getsid		printargs_d
113
-#define	sys_nice		printargs_d
114
-#define	sys_setpgid		printargs_d
115
-#define	sys_setpgrp		printargs_d
116
-#define	sys_timer_delete	printargs_d
117
-#define	sys_timer_getoverrun	printargs_d
110
+# define sys_exit		printargs_d
111
+# define sys_getpgid		printargs_d
112
+# define sys_getsid		printargs_d
113
+# define sys_nice		printargs_d
114
+# define sys_setpgid		printargs_d
115
+# define sys_setpgrp		printargs_d
116
+# define sys_timer_delete	printargs_d
117
+# define sys_timer_getoverrun	printargs_d
118 118
 
119 119
 /* unimplemented */
120
-#define	sys_afs_syscall		printargs
121
-#define	sys_break		printargs
122
-#define	sys_create_module	printargs
123
-#define	sys_ftime		printargs
124
-#define	sys_get_kernel_syms	printargs
125
-#define	sys_getpmsg		printargs
126
-#define	sys_gtty		printargs
127
-#define	sys_lock		printargs
128
-#define	sys_mpx			printargs
129
-#define	sys_nfsservctl		printargs
130
-#define	sys_prof		printargs
131
-#define	sys_profil		printargs
132
-#define	sys_putpmsg		printargs
133
-#define	sys_query_module	printargs
134
-#define	sys_security		printargs
135
-#define	sys_stty		printargs
136
-#define	sys_timerfd		printargs
137
-#define	sys_tuxcall		printargs
138
-#define	sys_ulimit		printargs
139
-#define	sys_vserver		printargs
120
+# define sys_afs_syscall		printargs
121
+# define sys_break		printargs
122
+# define sys_create_module	printargs
123
+# define sys_ftime		printargs
124
+# define sys_get_kernel_syms	printargs
125
+# define sys_getpmsg		printargs
126
+# define sys_gtty		printargs
127
+# define sys_lock		printargs
128
+# define sys_mpx			printargs
129
+# define sys_nfsservctl		printargs
130
+# define sys_prof		printargs
131
+# define sys_profil		printargs
132
+# define sys_putpmsg		printargs
133
+# define sys_query_module	printargs
134
+# define sys_security		printargs
135
+# define sys_stty		printargs
136
+# define sys_timerfd		printargs
137
+# define sys_tuxcall		printargs
138
+# define sys_ulimit		printargs
139
+# define sys_vserver		printargs
140 140
 
141 141
 /* deprecated */
142
-#define	sys_bdflush		printargs
143
-#define	sys_oldolduname		printargs
144
-#define	sys_olduname		printargs
145
-#define	sys_sysfs		printargs
142
+# define sys_bdflush		printargs
143
+# define sys_oldolduname		printargs
144
+# define sys_olduname		printargs
145
+# define sys_sysfs		printargs
146 146
 
147 147
 #endif /* !STRACE_LINUX_DUMMY_H */

+ 1
- 1
linux/hppa/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/hppa/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	unsigned int	tramp[9];

+ 1
- 1
linux/i386/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/i386/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	uint32_t	pretcode;

+ 1
- 1
linux/ia64/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 3
- 3
linux/ia64/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	unsigned long		arg0;
@@ -19,7 +19,7 @@ typedef struct {
19 19
 	struct sigcontext	sc;
20 20
 } struct_rt_sigframe;
21 21
 
22
-#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME	\
22
+# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME	\
23 23
 		offsetof(struct_rt_sigframe, sc.sc_mask)
24 24
 
25 25
 #endif /* !STRACE_RT_SIGFRAME_H */

+ 3
- 3
linux/inet_diag.h View File

@@ -6,10 +6,10 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_INET_DIAG_H
9
-#define STRACE_LINUX_INET_DIAG_H
9
+# define STRACE_LINUX_INET_DIAG_H
10 10
 
11
-#define TCPDIAG_GETSOCK 18
12
-#define DCCPDIAG_GETSOCK 19
11
+# define TCPDIAG_GETSOCK 18
12
+# define DCCPDIAG_GETSOCK 19
13 13
 
14 14
 /* Socket identity */
15 15
 struct inet_diag_sockid {

+ 1
- 1
linux/m68k/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/m68k/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	char		*pretcode;

+ 1
- 1
linux/metag/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/microblaze/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/mips/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/mips/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	uint32_t	pad[6];

+ 12
- 12
linux/netlink_diag.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_NETLINK_DIAG_H
9
-#define STRACE_LINUX_NETLINK_DIAG_H
9
+# define STRACE_LINUX_NETLINK_DIAG_H
10 10
 
11 11
 struct netlink_diag_req {
12 12
 	uint8_t sdiag_family;
@@ -45,18 +45,18 @@ enum {
45 45
 	NETLINK_DIAG_FLAGS,
46 46
 };
47 47
 
48
-#define NDIAG_SHOW_MEMINFO		0x00000001
49
-#define NDIAG_SHOW_GROUPS		0x00000002
50
-#define NDIAG_SHOW_RING_CFG		0x00000004 /* deprecated since 4.6 */
51
-#define NDIAG_SHOW_FLAGS		0x00000008
52
-#define NDIAG_PROTO_ALL			((uint8_t) ~0)
48
+# define NDIAG_SHOW_MEMINFO		0x00000001
49
+# define NDIAG_SHOW_GROUPS		0x00000002
50
+# define NDIAG_SHOW_RING_CFG		0x00000004 /* deprecated since 4.6 */
51
+# define NDIAG_SHOW_FLAGS		0x00000008
52
+# define NDIAG_PROTO_ALL			((uint8_t) ~0)
53 53
 
54 54
 /* flags */
55
-#define NDIAG_FLAG_CB_RUNNING		0x00000001
56
-#define NDIAG_FLAG_PKTINFO		0x00000002
57
-#define NDIAG_FLAG_BROADCAST_ERROR	0x00000004
58
-#define NDIAG_FLAG_NO_ENOBUFS		0x00000008
59
-#define NDIAG_FLAG_LISTEN_ALL_NSID	0x00000010
60
-#define NDIAG_FLAG_CAP_ACK		0x00000020
55
+# define NDIAG_FLAG_CB_RUNNING		0x00000001
56
+# define NDIAG_FLAG_PKTINFO		0x00000002
57
+# define NDIAG_FLAG_BROADCAST_ERROR	0x00000004
58
+# define NDIAG_FLAG_NO_ENOBUFS		0x00000008
59
+# define NDIAG_FLAG_LISTEN_ALL_NSID	0x00000010
60
+# define NDIAG_FLAG_CAP_ACK		0x00000020
61 61
 
62 62
 #endif /* !STRACE_LINUX_NETLINK_DIAG_H */

+ 1
- 1
linux/nios2/arch_regs.c View File

@@ -6,6 +6,6 @@
6 6
  */
7 7
 
8 8
 static struct user_pt_regs nios2_regs;
9
-# define ARCH_REGS_FOR_GETREGSET nios2_regs
9
+#define ARCH_REGS_FOR_GETREGSET nios2_regs
10 10
 #define ARCH_PC_REG nios2_regs.regs[PTR_EA]
11 11
 #define ARCH_SP_REG nios2_regs.regs[PTR_SP]

+ 1
- 1
linux/nios2/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/or1k/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 12
- 12
linux/packet_diag.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_PACKET_DIAG_H
9
-#define STRACE_LINUX_PACKET_DIAG_H
9
+# define STRACE_LINUX_PACKET_DIAG_H
10 10
 
11 11
 struct packet_diag_req {
12 12
 	uint8_t sdiag_family;
@@ -17,12 +17,12 @@ struct packet_diag_req {
17 17
 	uint32_t pdiag_cookie[2];
18 18
 };
19 19
 
20
-#define PACKET_SHOW_INFO	0x00000001
21
-#define PACKET_SHOW_MCLIST	0x00000002
22
-#define PACKET_SHOW_RING_CFG	0x00000004
23
-#define PACKET_SHOW_FANOUT	0x00000008
24
-#define PACKET_SHOW_MEMINFO	0x00000010
25
-#define PACKET_SHOW_FILTER	0x00000020
20
+# define PACKET_SHOW_INFO	0x00000001
21
+# define PACKET_SHOW_MCLIST	0x00000002
22
+# define PACKET_SHOW_RING_CFG	0x00000004
23
+# define PACKET_SHOW_FANOUT	0x00000008
24
+# define PACKET_SHOW_MEMINFO	0x00000010
25
+# define PACKET_SHOW_FILTER	0x00000020
26 26
 
27 27
 struct packet_diag_msg {
28 28
 	uint8_t pdiag_family;
@@ -52,11 +52,11 @@ struct packet_diag_info {
52 52
 	uint32_t pdi_tstamp;
53 53
 	uint32_t pdi_flags;
54 54
 
55
-#define PDI_RUNNING	0x1
56
-#define PDI_AUXDATA	0x2
57
-#define PDI_ORIGDEV	0x4
58
-#define PDI_VNETHDR	0x8
59
-#define PDI_LOSS	0x10
55
+# define PDI_RUNNING	0x1
56
+# define PDI_AUXDATA	0x2
57
+# define PDI_ORIGDEV	0x4
58
+# define PDI_VNETHDR	0x8
59
+# define PDI_LOSS	0x10
60 60
 };
61 61
 
62 62
 struct packet_diag_mclist {

+ 1
- 1
linux/powerpc/arch_rt_sigframe.c View File

@@ -5,7 +5,7 @@
5 5
  * SPDX-License-Identifier: LGPL-2.1-or-later
6 6
  */
7 7
 
8
-#define	SIGNAL_FRAMESIZE32	64
8
+#define SIGNAL_FRAMESIZE32	64
9 9
 
10 10
 FUNC_GET_RT_SIGFRAME_ADDR
11 11
 {

+ 1
- 1
linux/powerpc/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/powerpc64/arch_rt_sigframe.c View File

@@ -6,13 +6,13 @@
6 6
  */
7 7
 
8 8
 #undef FUNC_GET_RT_SIGFRAME_ADDR
9
-#define	FUNC_GET_RT_SIGFRAME_ADDR	\
9
+#define FUNC_GET_RT_SIGFRAME_ADDR	\
10 10
 	static kernel_ulong_t ppc_get_rt_sigframe_addr(struct tcb *tcp)
11 11
 
12 12
 #include "powerpc/arch_rt_sigframe.c"
13 13
 
14 14
 #undef FUNC_GET_RT_SIGFRAME_ADDR
15
-#define	FUNC_GET_RT_SIGFRAME_ADDR	DEF_FUNC_GET_RT_SIGFRAME_ADDR
15
+#define FUNC_GET_RT_SIGFRAME_ADDR	DEF_FUNC_GET_RT_SIGFRAME_ADDR
16 16
 
17 17
 FUNC_GET_RT_SIGFRAME_ADDR
18 18
 {

+ 1
- 1
linux/riscv/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 /* This is a generic definition for compatible architectures. */
14 14
 

+ 1
- 1
linux/s390/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/s390/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	uint8_t		callee_used_stack[__SIGNAL_FRAMESIZE];

+ 1
- 1
linux/sh/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/sh64/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	siginfo_t	*pinfo;

+ 3
- 3
linux/smc_diag.h View File

@@ -6,11 +6,11 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_SMC_DIAG_H
9
-#define STRACE_LINUX_SMC_DIAG_H
9
+# define STRACE_LINUX_SMC_DIAG_H
10 10
 
11
-#include <linux/inet_diag.h>
11
+# include <linux/inet_diag.h>
12 12
 
13
-#include "gcc_compat.h"
13
+# include "gcc_compat.h"
14 14
 
15 15
 /* Request structure */
16 16
 struct smc_diag_req {

+ 4
- 4
linux/sock_diag.h View File

@@ -6,12 +6,12 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_SOCK_DIAG_H
9
-#define STRACE_LINUX_SOCK_DIAG_H
9
+# define STRACE_LINUX_SOCK_DIAG_H
10 10
 
11
-#define SOCK_DIAG_BY_FAMILY 20
12
-#define SOCK_DESTROY 21
11
+# define SOCK_DIAG_BY_FAMILY 20
12
+# define SOCK_DESTROY 21
13 13
 
14
-#define SK_MEMINFO_VARS		9
14
+# define SK_MEMINFO_VARS		9
15 15
 
16 16
 struct sock_diag_req {
17 17
 	uint8_t	sdiag_family;

+ 1
- 1
linux/sparc/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 4
- 4
linux/sparc/rt_sigframe.h View File

@@ -6,10 +6,10 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include "ptrace.h"
12
-#include <signal.h>
11
+# include "ptrace.h"
12
+# include <signal.h>
13 13
 
14 14
 typedef struct {
15 15
 	struct sparc_stackf	ss;
@@ -19,7 +19,7 @@ typedef struct {
19 19
 	/* more data follows */
20 20
 } struct_rt_sigframe;
21 21
 
22
-#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME	\
22
+# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME	\
23 23
 		offsetof(struct_rt_sigframe, mask)
24 24
 
25 25
 #endif /* !STRACE_RT_SIGFRAME_H */

+ 1
- 1
linux/sparc64/arch_rt_sigframe.c View File

@@ -5,7 +5,7 @@
5 5
  * SPDX-License-Identifier: LGPL-2.1-or-later
6 6
  */
7 7
 
8
-#define	STACK_BIAS	2047
8
+#define STACK_BIAS	2047
9 9
 
10 10
 FUNC_GET_RT_SIGFRAME_ADDR
11 11
 {

+ 1
- 1
linux/sparc64/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 6
- 6
linux/syscall.h View File

@@ -8,13 +8,13 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_LINUX_SYSCALL_H
11
-#define STRACE_LINUX_SYSCALL_H
11
+# define STRACE_LINUX_SYSCALL_H
12 12
 
13
-#include "dummy.h"
14
-#include "sys_func.h"
15
-#include "sen.h"
13
+# include "dummy.h"
14
+# include "sys_func.h"
15
+# include "sen.h"
16 16
 
17
-#if HAVE_ARCH_UID16_SYSCALLS
17
+# if HAVE_ARCH_UID16_SYSCALLS
18 18
 extern SYS_FUNC(chown16);
19 19
 extern SYS_FUNC(fchown16);
20 20
 extern SYS_FUNC(getgroups16);
@@ -25,6 +25,6 @@ extern SYS_FUNC(setgroups16);
25 25
 extern SYS_FUNC(setresuid16);
26 26
 extern SYS_FUNC(setreuid16);
27 27
 extern SYS_FUNC(setuid16);
28
-#endif /* HAVE_ARCH_UID16_SYSCALLS */
28
+# endif /* HAVE_ARCH_UID16_SYSCALLS */
29 29
 
30 30
 #endif /* !STRACE_LINUX_SYSCALL_H */

+ 1
- 1
linux/tile/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 2
- 2
linux/tile/rt_sigframe.h View File

@@ -6,9 +6,9 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_RT_SIGFRAME_H
9
-#define STRACE_RT_SIGFRAME_H
9
+# define STRACE_RT_SIGFRAME_H
10 10
 
11
-#include <signal.h>
11
+# include <signal.h>
12 12
 
13 13
 typedef struct {
14 14
 	unsigned char	save_area[C_ABI_SAVE_AREA_SIZE];

+ 7
- 7
linux/unix_diag.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_LINUX_UNIX_DIAG_H
9
-#define STRACE_LINUX_UNIX_DIAG_H
9
+# define STRACE_LINUX_UNIX_DIAG_H
10 10
 
11 11
 struct unix_diag_req {
12 12
 	uint8_t	 sdiag_family;
@@ -18,12 +18,12 @@ struct unix_diag_req {
18 18
 	uint32_t udiag_cookie[2];
19 19
 };
20 20
 
21
-#define UDIAG_SHOW_NAME		0x01
22
-#define UDIAG_SHOW_VFS		0x02
23
-#define UDIAG_SHOW_PEER		0x04
24
-#define UDIAG_SHOW_ICONS	0x08
25
-#define UDIAG_SHOW_RQLEN	0x10
26
-#define UDIAG_SHOW_MEMINFO	0x20
21
+# define UDIAG_SHOW_NAME		0x01
22
+# define UDIAG_SHOW_VFS		0x02
23
+# define UDIAG_SHOW_PEER		0x04
24
+# define UDIAG_SHOW_ICONS	0x08
25
+# define UDIAG_SHOW_RQLEN	0x10
26
+# define UDIAG_SHOW_MEMINFO	0x20
27 27
 
28 28
 struct unix_diag_msg {
29 29
 	uint8_t	 udiag_family;

+ 3
- 3
linux/x86_64/arch_get_personality.c View File

@@ -25,9 +25,9 @@ get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
25 25
 
26 26
 	kernel_ulong_t scno = sci->entry.nr;
27 27
 
28
-#ifndef __X32_SYSCALL_BIT
29
-# define __X32_SYSCALL_BIT	0x40000000
30
-#endif
28
+# ifndef __X32_SYSCALL_BIT
29
+#  define __X32_SYSCALL_BIT	0x40000000
30
+# endif
31 31
 
32 32
 	if (pers == 0 && (scno & __X32_SYSCALL_BIT)) {
33 33
 		/*

+ 1
- 1
linux/x86_64/asm_stat.h View File

@@ -6,7 +6,7 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_X86_64_ASM_STAT_H
9
-#define STRACE_X86_64_ASM_STAT_H
9
+# define STRACE_X86_64_ASM_STAT_H
10 10
 
11 11
 # if defined __x86_64__ && defined __ILP32__
12 12
 #  define stat redirect_kernel_stat

+ 2
- 2
linux/x86_64/get_scno.c View File

@@ -50,9 +50,9 @@ arch_get_scno(struct tcb *tcp)
50 50
 			if ((long long) x86_64_regs.orig_rax != -1) {
51 51
 				currpers = 2;
52 52
 			} else {
53
-# ifdef X32
53
+#ifdef X32
54 54
 				currpers = 2;
55
-# endif
55
+#endif
56 56
 			}
57 57
 		}
58 58
 	}

+ 1
- 1
linux/x86_64/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
linux/xtensa/raw_syscall.h View File

@@ -8,7 +8,7 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_RAW_SYSCALL_H
11
-#define STRACE_RAW_SYSCALL_H
11
+# define STRACE_RAW_SYSCALL_H
12 12
 
13 13
 # include "kernel_types.h"
14 14
 

+ 1
- 1
loop.c View File

@@ -19,7 +19,7 @@ typedef struct loop_info struct_loop_info;
19 19
 #include "print_fields.h"
20 20
 
21 21
 #define XLAT_MACROS_ONLY
22
-# include "xlat/loop_cmds.h"
22
+#include "xlat/loop_cmds.h"
23 23
 #undef XLAT_MACROS_ONLY
24 24
 
25 25
 #include "xlat/loop_flags_options.h"

+ 2
- 2
lseek.c View File

@@ -30,11 +30,11 @@ SYS_FUNC(lseek)
30 30
 
31 31
 	kernel_long_t offset;
32 32
 
33
-# ifndef current_klongsize
33
+#ifndef current_klongsize
34 34
 	if (current_klongsize < sizeof(kernel_long_t)) {
35 35
 		offset = (int) tcp->u_arg[1];
36 36
 	} else
37
-# endif /* !current_klongsize */
37
+#endif /* !current_klongsize */
38 38
 	{
39 39
 		offset = tcp->u_arg[1];
40 40
 	}

+ 22
- 22
macros.h View File

@@ -6,36 +6,36 @@
6 6
  */
7 7
 
8 8
 #ifndef STRACE_MACROS_H
9
-#define STRACE_MACROS_H
9
+# define STRACE_MACROS_H
10 10
 
11
-#include <stdbool.h>
12
-#include <sys/types.h>
11
+# include <stdbool.h>
12
+# include <sys/types.h>
13 13
 
14
-#include "gcc_compat.h"
14
+# include "gcc_compat.h"
15 15
 
16
-#define ARRAY_SIZE(a_)	(sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
16
+# define ARRAY_SIZE(a_)	(sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
17 17
 
18
-#define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
18
+# define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
19 19
 
20
-#define STRINGIFY(...)		#__VA_ARGS__
21
-#define STRINGIFY_VAL(...)	STRINGIFY(__VA_ARGS__)
20
+# define STRINGIFY(...)		#__VA_ARGS__
21
+# define STRINGIFY_VAL(...)	STRINGIFY(__VA_ARGS__)
22 22
 
23
-#ifndef MAX
24
-# define MAX(a, b)		(((a) > (b)) ? (a) : (b))
25
-#endif
26
-#ifndef MIN
27
-# define MIN(a, b)		(((a) < (b)) ? (a) : (b))
28
-#endif
29
-#define CLAMP(val, min, max)	MIN(MAX(min, val), max)
23
+# ifndef MAX
24
+#  define MAX(a, b)		(((a) > (b)) ? (a) : (b))
25
+# endif
26
+# ifndef MIN
27
+#  define MIN(a, b)		(((a) < (b)) ? (a) : (b))
28
+# endif
29
+# define CLAMP(val, min, max)	MIN(MAX(min, val), max)
30 30
 
31
-#ifndef ROUNDUP
32
-# define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
33
-#endif
31
+# ifndef ROUNDUP
32
+#  define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
33
+# endif
34 34
 
35
-#ifndef offsetofend
36
-# define offsetofend(type_, member_)	\
35
+# ifndef offsetofend
36
+#  define offsetofend(type_, member_)	\
37 37
 	(offsetof(type_, member_) + sizeof(((type_ *)0)->member_))
38
-#endif
38
+# endif
39 39
 
40 40
 static inline bool
41 41
 is_filled(const char *ptr, char fill, size_t size)
@@ -47,7 +47,7 @@ is_filled(const char *ptr, char fill, size_t size)
47 47
 	return true;
48 48
 }
49 49
 
50
-#define IS_ARRAY_ZERO(arr_)	\
50
+# define IS_ARRAY_ZERO(arr_)	\
51 51
 	is_filled((const char *) (arr_), 0, sizeof(arr_) + MUST_BE_ARRAY(arr_))
52 52
 
53 53
 #endif /* !STRACE_MACROS_H */

+ 1
- 1
mmap_cache.h View File

@@ -5,7 +5,7 @@
5 5
  */
6 6
 
7 7
 #ifndef STRACE_MMAP_CACHE_H
8
-#define STRACE_MMAP_CACHE_H
8
+# define STRACE_MMAP_CACHE_H
9 9
 
10 10
 /*
11 11
  * Keep a sorted array of cache entries,

+ 2
- 2
mmap_notify.h View File

@@ -5,9 +5,9 @@
5 5
  */
6 6
 
7 7
 #ifndef STRACE_MMAP_NOTIFY_H
8
-#define STRACE_MMAP_NOTIFY_H
8
+# define STRACE_MMAP_NOTIFY_H
9 9
 
10
-#include "defs.h"
10
+# include "defs.h"
11 11
 
12 12
 typedef void (*mmap_notify_fn)(struct tcb *, void *);
13 13
 

+ 19
- 19
mpers_type.h View File

@@ -8,28 +8,28 @@
8 8
  */
9 9
 
10 10
 #ifndef STRACE_MPERS_TYPE_H
11
-#define STRACE_MPERS_TYPE_H
11
+# define STRACE_MPERS_TYPE_H
12 12
 
13
-#include "macros.h"
13
+# include "macros.h"
14 14
 
15
-#ifdef IN_MPERS
16
-# define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
17
-# ifdef MPERS_IS_m32
18
-#  define MPERS_PREFIX m32_
19
-#  define MPERS_DEFS "m32_type_defs.h"
20
-# elif defined MPERS_IS_mx32
21
-#  define MPERS_PREFIX mx32_
22
-#  define MPERS_DEFS "mx32_type_defs.h"
23
-# endif
24
-#else
25
-# define MPERS_PREFIX
26
-# define DEF_MPERS_TYPE(args) "empty.h"
27
-# if IN_MPERS_BOOTSTRAP
28
-#  define MPERS_DEFS "empty.h"
15
+# ifdef IN_MPERS
16
+#  define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
17
+#  ifdef MPERS_IS_m32
18
+#   define MPERS_PREFIX m32_
19
+#   define MPERS_DEFS "m32_type_defs.h"
20
+#  elif defined MPERS_IS_mx32
21
+#   define MPERS_PREFIX mx32_
22
+#   define MPERS_DEFS "mx32_type_defs.h"
23
+#  endif
29 24
 # else
30
-#  define MPERS_DEFS "native_defs.h"
31
-# endif
25
+#  define MPERS_PREFIX
26