Full support for Ginger Console
[linux-ginger.git] / drivers / staging / android / logger.h
bloba562434d74190f015317e2571ccedb80d5139304
1 /* include/linux/logger.h
3 * Copyright (C) 2007-2008 Google, Inc.
4 * Author: Robert Love <rlove@android.com>
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.
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.
17 #ifndef _LINUX_LOGGER_H
18 #define _LINUX_LOGGER_H
20 #include <linux/types.h>
21 #include <linux/ioctl.h>
23 struct 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 */
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 */
37 #define LOGGER_ENTRY_MAX_LEN (4*1024)
38 #define LOGGER_ENTRY_MAX_PAYLOAD \
39 (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
41 #define __LOGGERIO 0xAE
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 */
48 #endif /* _LINUX_LOGGER_H */