1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
7 /* Ignore one specific case in src/shared/bootspec.c where we want to stick
8 * with the log_debug() + return pattern */
9 log_debug("Found no default boot entry :(");
13 + return log_debug_errno(SYNTHETIC_ERRNO(e), args);
20 /* Ignore specific cases in src/import/{export,import,pull}.c where we want to return positive value on success. */
26 + return log_info_errno(SYNTHETIC_ERRNO(e), args);
34 + return log_notice_errno(SYNTHETIC_ERRNO(e), args);
41 + return log_error_errno(SYNTHETIC_ERRNO(e), args);
46 - log_emergency(args);
48 + return log_emergency_errno(SYNTHETIC_ERRNO(e), args);
50 identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
51 identifier ERRNO =~ "^E[A-Z]+$";
54 - log_LEVEL_errno(ERRNO, args);
55 + log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);
57 identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
58 identifier ERRNO =~ "^E[A-Z]+$";
62 - log_UNIT_LEVEL_errno(u, ERRNO, args);
63 + log_UNIT_LEVEL_errno(u, SYNTHETIC_ERRNO(ERRNO), args);
69 - log_unit_debug(u, args);
71 + return log_unit_debug_errno(u, SYNTHETIC_ERRNO(e), args);
77 - log_unit_info(u, args);
79 + return log_unit_info_errno(u, SYNTHETIC_ERRNO(e), args);
85 - log_unit_notice(u, args);
87 + return log_unit_notice_errno(u, SYNTHETIC_ERRNO(e), args);
93 - log_unit_error(u, args);
95 + return log_unit_error_errno(u, SYNTHETIC_ERRNO(e), args);
101 - log_unit_emergency(u, args);
103 + return log_unit_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
107 expression list args;
109 - log_link_debug(u, args);
111 + return log_link_debug_errno(u, SYNTHETIC_ERRNO(e), args);
115 expression list args;
117 - log_link_info(u, args);
119 + return log_link_info_errno(u, SYNTHETIC_ERRNO(e), args);
123 expression list args;
125 - log_link_notice(u, args);
127 + return log_link_notice_errno(u, SYNTHETIC_ERRNO(e), args);
131 expression list args;
133 - log_link_error(u, args);
135 + return log_link_error_errno(u, SYNTHETIC_ERRNO(e), args);
139 expression list args;
141 - log_link_emergency(u, args);
143 + return log_link_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
147 expression list args;
149 - log_netdev_debug(u, args);
151 + return log_netdev_debug_errno(u, SYNTHETIC_ERRNO(e), args);
155 expression list args;
157 - log_netdev_info(u, args);
159 + return log_netdev_info_errno(u, SYNTHETIC_ERRNO(e), args);
163 expression list args;
165 - log_netdev_notice(u, args);
167 + return log_netdev_notice_errno(u, SYNTHETIC_ERRNO(e), args);
171 expression list args;
173 - log_netdev_error(u, args);
175 + return log_netdev_error_errno(u, SYNTHETIC_ERRNO(e), args);
179 expression list args;
181 - log_netdev_emergency(u, args);
183 + return log_netdev_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
187 expression list args;
189 - log_device_debug(u, args);
191 + return log_device_debug_errno(u, SYNTHETIC_ERRNO(e), args);
195 expression list args;
197 - log_device_info(u, args);
199 + return log_device_info_errno(u, SYNTHETIC_ERRNO(e), args);
203 expression list args;
205 - log_device_notice(u, args);
207 + return log_device_notice_errno(u, SYNTHETIC_ERRNO(e), args);
211 expression list args;
213 - log_device_error(u, args);
215 + return log_device_error_errno(u, SYNTHETIC_ERRNO(e), args);
219 expression list args;
221 - log_device_emergency(u, args);
223 + return log_device_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
227 expression list args;
229 - log_token_debug(u, args);
231 + return log_token_debug_errno(u, SYNTHETIC_ERRNO(e), args);
235 expression list args;
237 - log_token_info(u, args);
239 + return log_token_info_errno(u, SYNTHETIC_ERRNO(e), args);
243 expression list args;
245 - log_token_notice(u, args);
247 + return log_token_notice_errno(u, SYNTHETIC_ERRNO(e), args);
251 expression list args;
253 - log_token_error(u, args);
255 + return log_token_error_errno(u, SYNTHETIC_ERRNO(e), args);
259 expression list args;
261 - log_token_emergency(u, args);
263 + return log_token_emergency_errno(u, SYNTHETIC_ERRNO(e), args);