This patch cleans up btf.h in uapi: 1) Rename "name" to "name_off" to better reflect it is an offset to the string section instead of a char array. 2) Remove unused value BTF_FLAGS_COMPR and BTF_MAGIC_SWAP
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -6,9 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | #include <linux/types.h> |
| 7 | 7 | |
| 8 | 8 | #define BTF_MAGIC 0xeB9F |
| 9 | −#define BTF_MAGIC_SWAP 0x9FeB | |
| 10 | 9 | #define BTF_VERSION 1 |
| 11 | −#define BTF_FLAGS_COMPR 0x01 | |
| 12 | 10 | |
| 13 | 11 | struct btf_header { |
| 14 | 12 | __u16 magic; |
| @@ -43,7 +41,7 @@ struct btf_header { · 28 unmodified lines | ||
| 43 | 41 | #define BTF_STR_OFFSET(ref) ((ref) & BTF_MAX_NAME_OFFSET) |
| 44 | 42 | |
| 45 | 43 | struct btf_type { |
| 46 | − __u32 name; | |
| 44 | + __u32 name_off; | |
| 47 | 45 | /* "info" bits arrangement |
| 48 | 46 | * bits 0-15: vlen (e.g. # of struct's members) |
| 49 | 47 | * bits 16-23: unused |
| @@ -105,7 +103,7 @@ struct btf_type { · 55 unmodified lines | ||
| 105 | 103 | * info in "struct btf_type"). |
| 106 | 104 | */ |
| 107 | 105 | struct btf_enum { |
| 108 | − __u32 name; | |
| 106 | + __u32 name_off; | |
| 109 | 107 | __s32 val; |
| 110 | 108 | }; |
| 111 | 109 | |
| @@ -122,7 +120,7 @@ struct btf_array { · 10 unmodified lines | ||
| 122 | 120 | * "struct btf_type"). |
| 123 | 121 | */ |
| 124 | 122 | struct btf_member { |
| 125 | − __u32 name; | |
| 123 | + __u32 name_off; | |
| 126 | 124 | __u32 type; |
| 127 | 125 | __u32 offset; /* offset in bits */ |
| 128 | 126 | }; |