mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
43461aec82
PD#SWPL-145682 Problem: bring up kernel6.6 Solution: 1. porting kernel6.6 2. compatible with different kernel versions 3. bring up kernel6.6 Verify: sc2 c2 a4 a5 Test: None Change-Id: Ie22af0abc8ea96261e8a8cc7804b58565aedd904 Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
80 lines
2.4 KiB
C
80 lines
2.4 KiB
C
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
|
|
/*
|
|
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _LINUX_LOGGER_H
|
|
#define _LINUX_LOGGER_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/ioctl.h>
|
|
|
|
/**
|
|
* struct user_logger_entry_compat - defines a single entry that is given
|
|
* to a logger
|
|
* @len: The length of the payload
|
|
* @__pad: Two bytes of padding that appear to be required
|
|
* @pid: The generating process' process ID
|
|
* @tid: The generating process' thread ID
|
|
* @sec: The number of seconds that have elapsed since the Epoch
|
|
* @nsec: The number of nanoseconds that have elapsed since @sec
|
|
* @msg: The message that is to be logged
|
|
*
|
|
* The userspace structure for version 1 of the logger_entry ABI.
|
|
* This structure is returned to userspace unless the caller requests
|
|
* an upgrade to a newer ABI version.
|
|
*/
|
|
struct user_logger_entry_compat {
|
|
__u16 len;
|
|
__u16 __pad;
|
|
__s32 pid;
|
|
__s32 tid;
|
|
__s32 sec;
|
|
__s32 nsec;
|
|
char msg[];
|
|
};
|
|
|
|
/**
|
|
* struct logger_entry - defines a single entry that is given to a logger
|
|
* @len: The length of the payload
|
|
* @hdr_size: sizeof(struct logger_entry_v2)
|
|
* @pid: The generating process' process ID
|
|
* @tid: The generating process' thread ID
|
|
* @sec: The number of seconds that have elapsed since the Epoch
|
|
* @nsec: The number of nanoseconds that have elapsed since @sec
|
|
* @euid: Effective UID of logger
|
|
* @msg: The message that is to be logged
|
|
*
|
|
* The structure for version 2 of the logger_entry ABI.
|
|
* This structure is returned to userspace if ioctl(LOGGER_SET_VERSION)
|
|
* is called with version >= 2
|
|
*/
|
|
struct logger_entry {
|
|
__u16 len;
|
|
__u16 hdr_size;
|
|
__s32 pid;
|
|
__s32 tid;
|
|
__s32 sec;
|
|
__s32 nsec;
|
|
kuid_t euid;
|
|
char msg[];
|
|
};
|
|
|
|
#define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */
|
|
#define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */
|
|
#define LOGGER_LOG_SYSTEM "log_system" /* system/framework messages */
|
|
#define LOGGER_LOG_MAIN "log_main" /* everything else */
|
|
|
|
#define LOGGER_ENTRY_MAX_PAYLOAD 4076
|
|
|
|
#define __LOGGERIO 0xAE
|
|
|
|
#define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
|
|
#define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
|
|
#define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
|
|
#define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
|
|
#define LOGGER_GET_VERSION _IO(__LOGGERIO, 5) /* abi version */
|
|
#define LOGGER_SET_VERSION _IO(__LOGGERIO, 6) /* abi version */
|
|
|
|
#endif /* _LINUX_LOGGER_H */
|