History

prefix-handling analogues of errorf() and friends

called errorfc/infofc/warnfc/invalfc

Al Viro committed 6 years ago

Commit a3ff9371 parent 328de521 file · +4 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/fs_context.h+4−0
@@ -203,6 +203,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, · 202 unmodified lines
203203 */
204204 #define infof(fc, fmt, ...) __logfc(fc, 'i', fmt, ## __VA_ARGS__)
205205 #define info_plog(p, fmt, ...) __plog(p, 'i', fmt, ## __VA_ARGS__)
206+#define infofc(p, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
206207
207208 /**
208209 * warnf - Store supplementary warning message
@@ -214,6 +215,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, · 5 unmodified lines
214215 */
215216 #define warnf(fc, fmt, ...) __logfc(fc, 'w', fmt, ## __VA_ARGS__)
216217 #define warn_plog(p, fmt, ...) __plog(p, 'w', fmt, ## __VA_ARGS__)
218+#define warnfc(fc, fmt, ...) __plog((&(fc)->log), 'w', fmt, ## __VA_ARGS__)
217219
218220 /**
219221 * errorf - Store supplementary error message
@@ -225,6 +227,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, · 5 unmodified lines
225227 */
226228 #define errorf(fc, fmt, ...) __logfc(fc, 'e', fmt, ## __VA_ARGS__)
227229 #define error_plog(p, fmt, ...) __plog(p, 'e', fmt, ## __VA_ARGS__)
230+#define errorfc(fc, fmt, ...) __plog((&(fc)->log), 'e', fmt, ## __VA_ARGS__)
228231
229232 /**
230233 * invalf - Store supplementary invalid argument error message
@@ -236,5 +239,6 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, · 5 unmodified lines
236239 */
237240 #define invalf(fc, fmt, ...) (errorf(fc, fmt, ## __VA_ARGS__), -EINVAL)
238241 #define inval_plog(p, fmt, ...) (error_plog(p, fmt, ## __VA_ARGS__), -EINVAL)
242+#define invalfc(fc, fmt, ...) (errorfc(fc, fmt, ## __VA_ARGS__), -EINVAL)
239243
240244 #endif /* _LINUX_FS_CONTEXT_H */