aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/logger.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/android/logger.h')
-rw-r--r--drivers/staging/android/logger.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/staging/android/logger.h b/drivers/staging/android/logger.h
new file mode 100644
index 00000000000..a562434d741
--- /dev/null
+++ b/drivers/staging/android/logger.h
@@ -0,0 +1,48 @@
1/* include/linux/logger.h
2 *
3 * Copyright (C) 2007-2008 Google, Inc.
4 * Author: Robert Love <rlove@android.com>
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
23struct logger_entry {
24 __u16 len; /* length of the payload */
25 __u16 __pad; /* no matter what, we get 2 bytes of padding */
26 __s32 pid; /* generating process's pid */
27 __s32 tid; /* generating process's tid */
28 __s32 sec; /* seconds since Epoch */
29 __s32 nsec; /* nanoseconds */
30 char msg[0]; /* the entry's payload */
31};
32
33#define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */
34#define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */
35#define LOGGER_LOG_MAIN "log_main" /* everything else */
36
37#define LOGGER_ENTRY_MAX_LEN (4*1024)
38#define LOGGER_ENTRY_MAX_PAYLOAD \
39 (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
40
41#define __LOGGERIO 0xAE
42
43#define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
44#define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
45#define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
46#define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
47
48#endif /* _LINUX_LOGGER_H */