Skip to content

Commit a3ff937

Browse files
author
Al Viro
committed
prefix-handling analogues of errorf() and friends
called errorfc/infofc/warnfc/invalfc Signed-off-by: Al Viro <[email protected]>
1 parent 328de52 commit a3ff937

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/fs_context.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt,
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,
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,
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,
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 */

0 commit comments

Comments
 (0)