Ken Tsou | 6812923 | 2022-07-28 07:10:03 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright 2019-2022 Google LLC |
| 4 | */ |
| 5 | |
| 6 | #ifndef __GOOGLE_LOGBUFFER_H_ |
| 7 | #define __GOOGLE_LOGBUFFER_H_ |
| 8 | |
| 9 | #include <linux/stdarg.h> |
| 10 | |
| 11 | struct logbuffer; |
| 12 | |
| 13 | void logbuffer_log(struct logbuffer *instance, const char *fmt, ...); |
| 14 | void logbuffer_logk(struct logbuffer *instance, int loglevel, const char *fmt, ...); |
| 15 | void logbuffer_vlog(struct logbuffer *instance, const char *fmt, |
| 16 | va_list args); |
Kyle Tso | 2e5d7c3 | 2023-04-20 15:22:59 +0800 | [diff] [blame] | 17 | int dev_logbuffer_logk(struct device *dev, struct logbuffer *instance, int loglevel, |
| 18 | const char *fmt, ...); |
| 19 | |
Ken Tsou | 6812923 | 2022-07-28 07:10:03 +0800 | [diff] [blame] | 20 | /* |
| 21 | * Registers a new log buffer entry. |
| 22 | * param name: name of the file in the /d/logbuffer/ directory. |
| 23 | * returns the pointer to the logbuffer metadata. |
| 24 | */ |
| 25 | struct logbuffer *logbuffer_register(const char *name); |
| 26 | |
| 27 | void logbuffer_unregister(struct logbuffer *instance); |
| 28 | |
| 29 | #endif /* __GOOGLE_LOGBUFFER_H_ */ |
| 30 | |