xref: /openbmc/linux/include/linux/syslog.h (revision e3f12f06)
1c82ee6d3SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
200234592SKees Cook /*  Syslog internals
300234592SKees Cook  *
400234592SKees Cook  *  Copyright 2010 Canonical, Ltd.
500234592SKees Cook  *  Author: Kees Cook <kees.cook@canonical.com>
600234592SKees Cook  */
700234592SKees Cook 
800234592SKees Cook #ifndef _LINUX_SYSLOG_H
900234592SKees Cook #define _LINUX_SYSLOG_H
1000234592SKees Cook 
11*e3f12f06SThomas Gleixner #include <linux/wait.h>
12*e3f12f06SThomas Gleixner 
13d78ca3cdSKees Cook /* Close the log.  Currently a NOP. */
14d78ca3cdSKees Cook #define SYSLOG_ACTION_CLOSE          0
15d78ca3cdSKees Cook /* Open the log. Currently a NOP. */
16d78ca3cdSKees Cook #define SYSLOG_ACTION_OPEN           1
17d78ca3cdSKees Cook /* Read from the log. */
18d78ca3cdSKees Cook #define SYSLOG_ACTION_READ           2
19d78ca3cdSKees Cook /* Read all messages remaining in the ring buffer. */
20d78ca3cdSKees Cook #define SYSLOG_ACTION_READ_ALL       3
21d78ca3cdSKees Cook /* Read and clear all messages remaining in the ring buffer */
22d78ca3cdSKees Cook #define SYSLOG_ACTION_READ_CLEAR     4
23d78ca3cdSKees Cook /* Clear ring buffer. */
24d78ca3cdSKees Cook #define SYSLOG_ACTION_CLEAR          5
25d78ca3cdSKees Cook /* Disable printk's to console */
26d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_OFF    6
27d78ca3cdSKees Cook /* Enable printk's to console */
28d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_ON     7
29d78ca3cdSKees Cook /* Set level of messages printed to console */
30d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_LEVEL  8
31d78ca3cdSKees Cook /* Return number of unread characters in the log buffer */
32d78ca3cdSKees Cook #define SYSLOG_ACTION_SIZE_UNREAD    9
33d78ca3cdSKees Cook /* Return size of the log buffer */
34d78ca3cdSKees Cook #define SYSLOG_ACTION_SIZE_BUFFER   10
35d78ca3cdSKees Cook 
36637241a9SKees Cook #define SYSLOG_FROM_READER           0
37637241a9SKees Cook #define SYSLOG_FROM_PROC             1
3800234592SKees Cook 
393ea4331cSVasily Averin int do_syslog(int type, char __user *buf, int count, int source);
40*e3f12f06SThomas Gleixner extern wait_queue_head_t log_wait;
41069fb0b6SSebastian Schmidt 
4200234592SKees Cook #endif /* _LINUX_SYSLOG_H */
43