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
203 */203 */
204#define infof(fc, fmt, ...) __logfc(fc, 'i', fmt, ## __VA_ARGS__)204#define infof(fc, fmt, ...) __logfc(fc, 'i', fmt, ## __VA_ARGS__)
205#define info_plog(p, fmt, ...) __plog(p, 'i', fmt, ## __VA_ARGS__)205#define info_plog(p, fmt, ...) __plog(p, 'i', fmt, ## __VA_ARGS__)
206#define infofc(p, fmt, ...) __plog((&(fc)->log), 'i', fmt, ## __VA_ARGS__)
206 207
207/**208/**
208 * warnf - Store supplementary warning message209 * 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
214 */215 */
215#define warnf(fc, fmt, ...) __logfc(fc, 'w', fmt, ## __VA_ARGS__)216#define warnf(fc, fmt, ...) __logfc(fc, 'w', fmt, ## __VA_ARGS__)
216#define warn_plog(p, fmt, ...) __plog(p, 'w', fmt, ## __VA_ARGS__)217#define warn_plog(p, fmt, ...) __plog(p, 'w', fmt, ## __VA_ARGS__)
218#define warnfc(fc, fmt, ...) __plog((&(fc)->log), 'w', fmt, ## __VA_ARGS__)
217 219
218/**220/**
219 * errorf - Store supplementary error message221 * 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
225 */227 */
226#define errorf(fc, fmt, ...) __logfc(fc, 'e', fmt, ## __VA_ARGS__)228#define errorf(fc, fmt, ...) __logfc(fc, 'e', fmt, ## __VA_ARGS__)
227#define error_plog(p, fmt, ...) __plog(p, 'e', fmt, ## __VA_ARGS__)229#define error_plog(p, fmt, ...) __plog(p, 'e', fmt, ## __VA_ARGS__)
230#define errorfc(fc, fmt, ...) __plog((&(fc)->log), 'e', fmt, ## __VA_ARGS__)
228 231
229/**232/**
230 * invalf - Store supplementary invalid argument error message233 * 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
236 */239 */
237#define invalf(fc, fmt, ...) (errorf(fc, fmt, ## __VA_ARGS__), -EINVAL)240#define invalf(fc, fmt, ...) (errorf(fc, fmt, ## __VA_ARGS__), -EINVAL)
238#define inval_plog(p, fmt, ...) (error_plog(p, fmt, ## __VA_ARGS__), -EINVAL)241#define inval_plog(p, fmt, ...) (error_plog(p, fmt, ## __VA_ARGS__), -EINVAL)
242#define invalfc(fc, fmt, ...) (errorfc(fc, fmt, ## __VA_ARGS__), -EINVAL)
239 243
240#endif /* _LINUX_FS_CONTEXT_H */244#endif /* _LINUX_FS_CONTEXT_H */