mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
vboot2: Allow platform dependent debug logging
TEST=Built with VBOOT_DEBUG on/off. Booted Nyan Blaze. Verified debut output. BUG=None BRANCH=none Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Id189231f16ca8719dfff0ef3c9a8d4982b741d5f Reviewed-on: https://chromium-review.googlesource.com/205157 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
5b63803f6c
commit
dd5883dee6
@@ -372,4 +372,5 @@ int vb2ex_read_resource(struct vb2_context *ctx,
|
|||||||
void *buf,
|
void *buf,
|
||||||
uint32_t size);
|
uint32_t size);
|
||||||
|
|
||||||
|
void vb2ex_printf(const char *func, const char *fmt, ...);
|
||||||
#endif /* VBOOT_2_API_H_ */
|
#endif /* VBOOT_2_API_H_ */
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#ifndef VBOOT_REFERENCE_VBOOT_2COMMON_H_
|
#ifndef VBOOT_REFERENCE_VBOOT_2COMMON_H_
|
||||||
#define VBOOT_REFERENCE_VBOOT_2COMMON_H_
|
#define VBOOT_REFERENCE_VBOOT_2COMMON_H_
|
||||||
|
|
||||||
|
#include "2api.h"
|
||||||
#include "2return_codes.h"
|
#include "2return_codes.h"
|
||||||
#include "2sha.h"
|
#include "2sha.h"
|
||||||
#include "2struct.h"
|
#include "2struct.h"
|
||||||
@@ -23,13 +24,16 @@ struct vb2_public_key;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debug output. Defaults to printf(), but can be overridden on a per-platform
|
* Debug output. printf() for tests. otherwise, it's platform-dependent.
|
||||||
* basis.
|
|
||||||
*/
|
*/
|
||||||
#if defined(VBOOT_DEBUG) && !defined(VB2_DEBUG)
|
#if defined(VBOOT_DEBUG)
|
||||||
#define VB2_DEBUG(format, args...) printf(format, ## args)
|
# if defined(FOR_TEST)
|
||||||
|
# define VB2_DEBUG(format, args...) printf(format, ## args)
|
||||||
|
# else
|
||||||
|
# define VB2_DEBUG(format, args...) vb2ex_printf(__func__, format, ## args)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define VB2_DEBUG(format, args...)
|
# define VB2_DEBUG(format, args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Alignment for work buffer pointers/allocations */
|
/* Alignment for work buffer pointers/allocations */
|
||||||
|
|||||||
Reference in New Issue
Block a user