Files
kernel_google_redbull/include/linux/bldr_debug_tools.h
Will McVicker 652e1b559d GKI: fs: pstore: bldrlog: add export symbols for modularizing pstore
This is prep for enabling PSTORE as a module.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 143889848
Bug: 143889751
Test: build
Change-Id: If4a7caff97c3076c526d8fb844077626ae42daf0
2019-11-05 17:26:07 -08:00

40 lines
1.5 KiB
C

/* Copyright 2018 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __BLDR_DEBUG_TOOLS_H__
#define __BLDR_DEBUG_TOOLS_H__
#include <linux/types.h>
#if IS_ENABLED(CONFIG_BLDR_DEBUG_LOG)
#define BOOT_DEBUG_MAGIC 0xAACCBBDD
ssize_t bldr_log_read_once(char __user *userbuf, ssize_t klog_size);
ssize_t bldr_last_log_read_once(char __user *userbuf, ssize_t klog_size);
ssize_t bldr_log_read(const void *lastk_buf, ssize_t lastk_size,
char __user *userbuf, size_t count, loff_t *ppos);
ssize_t bldr_log_total_size(void);
int bldr_log_init(void);
void bldr_log_release(void);
#else
static inline ssize_t bldr_log_read_once(char __user *userbuf,
ssize_t klog_size) { return 0; }
static inline ssize_t bldr_last_log_read_once(char __user *userbuf,
ssize_t klog_size) { return 0; }
static inline ssize_t bldr_log_read(const void *lastk_buf, ssize_t lastk_size,
char __user *userbuf, size_t count, loff_t *ppos) { return 0; }
static inline ssize_t bldr_log_total_size(void) { return 0; }
static inline int bldr_log_init(void) { return 0; }
static inline void bldr_log_release(void) { return; }
#endif
#endif /* __BLDR_DEBUG_TOOLS_H__ */