Commit 52e1c51
committed
libbpf-cargo: Honor ObjectBuilder in skeleton infrastructure
With commit d105bf2 ("libbpf-cargo: Open skeleton without options
by default") we changed the default behavior of the generated
SkelBuilder to only use open options if explicitly provided to the newly
added open_opts() constructor. What wasn't handled correctly was the
existing options present in the obj_builder member.
Fix this by trying to be more clever and auto detect whether the
ObjectBuilder has had any changes over its default representation.
Closes: libbpf#1309
Reported-by: Francisco Javier Honduvilla Coto <[email protected]>
Signed-off-by: Daniel Müller <[email protected]>1 parent 9622223 commit 52e1c51
File tree
3 files changed
+50
-20
lines changed- libbpf-cargo
- src/gen
- libbpf-rs/src
3 files changed
+50
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
863 | 864 | | |
864 | 865 | | |
865 | 866 | | |
| |||
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
986 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
987 | 996 | | |
988 | 997 | | |
989 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 115 | | |
128 | 116 | | |
129 | 117 | | |
130 | | - | |
| 118 | + | |
131 | 119 | | |
132 | 120 | | |
133 | 121 | | |
134 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
135 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
136 | 155 | | |
137 | 156 | | |
138 | 157 | | |
139 | | - | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
145 | 164 | | |
146 | 165 | | |
147 | 166 | | |
148 | | - | |
| 167 | + | |
149 | 168 | | |
150 | 169 | | |
151 | 170 | | |
| |||
154 | 173 | | |
155 | 174 | | |
156 | 175 | | |
157 | | - | |
| 176 | + | |
158 | 177 | | |
159 | 178 | | |
160 | 179 | | |
| |||
208 | 227 | | |
209 | 228 | | |
210 | 229 | | |
211 | | - | |
| 230 | + | |
212 | 231 | | |
213 | 232 | | |
214 | 233 | | |
| |||
0 commit comments