1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2@@
3expression e;
4expression list args;
5@@
6(
7/* Ignore one specific case in src/shared/bootspec.c where we want to stick
8 * with the log_debug() + return pattern */
9log_debug("Found no default boot entry :(");
10|
11- log_debug(args);
12- return -e;
13+ return log_debug_errno(SYNTHETIC_ERRNO(e), args);
14)
15@@
16expression e;
17expression list args;
18@@
19(
20/* Ignore specific cases in src/import/{export,import,pull}.c where we want to return positive value on success. */
21log_info("Exiting.");
22return -r;
23|
24- log_info(args);
25- return -e;
26+ return log_info_errno(SYNTHETIC_ERRNO(e), args);
27)
28@@
29expression e;
30expression list args;
31@@
32- log_notice(args);
33- return -e;
34+ return log_notice_errno(SYNTHETIC_ERRNO(e), args);
35@@
36expression e;
37expression list args;
38@@
39- log_error(args);
40- return -e;
41+ return log_error_errno(SYNTHETIC_ERRNO(e), args);
42@@
43expression e;
44expression list args;
45@@
46- log_emergency(args);
47- return -e;
48+ return log_emergency_errno(SYNTHETIC_ERRNO(e), args);
49@@
50identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
51identifier ERRNO =~ "^E[A-Z]+$";
52expression list args;
53@@
54- log_LEVEL_errno(ERRNO, args);
55+ log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);
56@@
57identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
58identifier ERRNO =~ "^E[A-Z]+$";
59expression u;
60expression list args;
61@@
62- log_UNIT_LEVEL_errno(u, ERRNO, args);
63+ log_UNIT_LEVEL_errno(u, SYNTHETIC_ERRNO(ERRNO), args);
64@@
65expression e;
66expression u;
67expression list args;
68@@
69- log_unit_debug(u, args);
70- return -e;
71+ return log_unit_debug_errno(u, SYNTHETIC_ERRNO(e), args);
72@@
73expression e;
74expression u;
75expression list args;
76@@
77- log_unit_info(u, args);
78- return -e;
79+ return log_unit_info_errno(u, SYNTHETIC_ERRNO(e), args);
80@@
81expression e;
82expression u;
83expression list args;
84@@
85- log_unit_notice(u, args);
86- return -e;
87+ return log_unit_notice_errno(u, SYNTHETIC_ERRNO(e), args);
88@@
89expression e;
90expression u;
91expression list args;
92@@
93- log_unit_error(u, args);
94- return -e;
95+ return log_unit_error_errno(u, SYNTHETIC_ERRNO(e), args);
96@@
97expression e;
98expression u;
99expression list args;
100@@
101- log_unit_emergency(u, args);
102- return -e;
103+ return log_unit_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
104@@
105expression e;
106expression u;
107expression list args;
108@@
109- log_link_debug(u, args);
110- return -e;
111+ return log_link_debug_errno(u, SYNTHETIC_ERRNO(e), args);
112@@
113expression e;
114expression u;
115expression list args;
116@@
117- log_link_info(u, args);
118- return -e;
119+ return log_link_info_errno(u, SYNTHETIC_ERRNO(e), args);
120@@
121expression e;
122expression u;
123expression list args;
124@@
125- log_link_notice(u, args);
126- return -e;
127+ return log_link_notice_errno(u, SYNTHETIC_ERRNO(e), args);
128@@
129expression e;
130expression u;
131expression list args;
132@@
133- log_link_error(u, args);
134- return -e;
135+ return log_link_error_errno(u, SYNTHETIC_ERRNO(e), args);
136@@
137expression e;
138expression u;
139expression list args;
140@@
141- log_link_emergency(u, args);
142- return -e;
143+ return log_link_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
144@@
145expression e;
146expression u;
147expression list args;
148@@
149- log_netdev_debug(u, args);
150- return -e;
151+ return log_netdev_debug_errno(u, SYNTHETIC_ERRNO(e), args);
152@@
153expression e;
154expression u;
155expression list args;
156@@
157- log_netdev_info(u, args);
158- return -e;
159+ return log_netdev_info_errno(u, SYNTHETIC_ERRNO(e), args);
160@@
161expression e;
162expression u;
163expression list args;
164@@
165- log_netdev_notice(u, args);
166- return -e;
167+ return log_netdev_notice_errno(u, SYNTHETIC_ERRNO(e), args);
168@@
169expression e;
170expression u;
171expression list args;
172@@
173- log_netdev_error(u, args);
174- return -e;
175+ return log_netdev_error_errno(u, SYNTHETIC_ERRNO(e), args);
176@@
177expression e;
178expression u;
179expression list args;
180@@
181- log_netdev_emergency(u, args);
182- return -e;
183+ return log_netdev_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
184@@
185expression e;
186expression u;
187expression list args;
188@@
189- log_device_debug(u, args);
190- return -e;
191+ return log_device_debug_errno(u, SYNTHETIC_ERRNO(e), args);
192@@
193expression e;
194expression u;
195expression list args;
196@@
197- log_device_info(u, args);
198- return -e;
199+ return log_device_info_errno(u, SYNTHETIC_ERRNO(e), args);
200@@
201expression e;
202expression u;
203expression list args;
204@@
205- log_device_notice(u, args);
206- return -e;
207+ return log_device_notice_errno(u, SYNTHETIC_ERRNO(e), args);
208@@
209expression e;
210expression u;
211expression list args;
212@@
213- log_device_error(u, args);
214- return -e;
215+ return log_device_error_errno(u, SYNTHETIC_ERRNO(e), args);
216@@
217expression e;
218expression u;
219expression list args;
220@@
221- log_device_emergency(u, args);
222- return -e;
223+ return log_device_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
224@@
225expression e;
226expression u;
227expression list args;
228@@
229- log_token_debug(u, args);
230- return -e;
231+ return log_token_debug_errno(u, SYNTHETIC_ERRNO(e), args);
232@@
233expression e;
234expression u;
235expression list args;
236@@
237- log_token_info(u, args);
238- return -e;
239+ return log_token_info_errno(u, SYNTHETIC_ERRNO(e), args);
240@@
241expression e;
242expression u;
243expression list args;
244@@
245- log_token_notice(u, args);
246- return -e;
247+ return log_token_notice_errno(u, SYNTHETIC_ERRNO(e), args);
248@@
249expression e;
250expression u;
251expression list args;
252@@
253- log_token_error(u, args);
254- return -e;
255+ return log_token_error_errno(u, SYNTHETIC_ERRNO(e), args);
256@@
257expression e;
258expression u;
259expression list args;
260@@
261- log_token_emergency(u, args);
262- return -e;
263+ return log_token_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
264