Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
logger.h
Go to the documentation of this file.
1 /* include/linux/logger.h
2  *
3  * Copyright (C) 2007-2008 Google, Inc.
4  * Author: Robert Love <[email protected]>
5  *
6  * This software is licensed under the terms of the GNU General Public
7  * License version 2, as published by the Free Software Foundation, and
8  * may be copied, distributed, and modified under those terms.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  */
16 
17 #ifndef _LINUX_LOGGER_H
18 #define _LINUX_LOGGER_H
19 
20 #include <linux/types.h>
21 #include <linux/ioctl.h>
22 
33 struct logger_entry {
40  char msg[0];
41 };
42 
43 #define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */
44 #define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */
45 #define LOGGER_LOG_SYSTEM "log_system" /* system/framework messages */
46 #define LOGGER_LOG_MAIN "log_main" /* everything else */
47 
48 #define LOGGER_ENTRY_MAX_LEN (4*1024)
49 #define LOGGER_ENTRY_MAX_PAYLOAD \
50  (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
51 
52 #define __LOGGERIO 0xAE
53 
54 #define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
55 #define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
56 #define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
57 #define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
58 
59 #endif /* _LINUX_LOGGER_H */