mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
VbHWID() returns a fixed string which can also be a returning a
string that lives in the read only text segment or read only flash.
Because of this the compiler will rightfully error when built with
-Werror and -Wwrite-strings because the const qualifier is being
ignored. Correct this and the ripple effect in VbRenderTextAtPos().
VbRenderTextAtPos() should be using constant strings anyhow.
BUG=chrome-os-partner:17695
BRANCH=None
TEST=built fwlib with -Werror -Wwrite-strings. Compiles correctly. make
runtests still passes as well.
Change-Id: Id03a783d2d9b5de4cc3b3ce0fa6d74934751cca4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44043
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
57 lines
1.7 KiB
C
57 lines
1.7 KiB
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* Display functions used in kernel selection.
|
|
*/
|
|
|
|
#ifndef VBOOT_REFERENCE_VBOOT_DISPLAY_H_
|
|
#define VBOOT_REFERENCE_VBOOT_DISPLAY_H_
|
|
|
|
#include "bmpblk_font.h"
|
|
#include "vboot_api.h"
|
|
#include "vboot_nvstorage.h"
|
|
|
|
VbError_t VbDisplayScreenFromGBB(VbCommonParams *cparams, uint32_t screen,
|
|
VbNvContext *vncptr);
|
|
VbError_t VbDisplayScreen(VbCommonParams *cparams, uint32_t screen, int force,
|
|
VbNvContext *vncptr);
|
|
VbError_t VbDisplayDebugInfo(VbCommonParams *cparams, VbNvContext *vncptr);
|
|
VbError_t VbCheckDisplayKey(VbCommonParams *cparams, uint32_t key,
|
|
VbNvContext *vncptr);
|
|
|
|
/* Internal functions, for unit testing */
|
|
|
|
typedef FontArrayHeader VbFont_t;
|
|
|
|
VbFont_t *VbInternalizeFontData(FontArrayHeader *fonthdr);
|
|
|
|
void VbDoneWithFontForNow(VbFont_t *ptr);
|
|
|
|
ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
|
|
void **bufferptr, uint32_t *buffersize);
|
|
|
|
/**
|
|
* Try to display the specified text at a particular position.
|
|
*/
|
|
void VbRenderTextAtPos(const char *text, int right_to_left,
|
|
uint32_t x, uint32_t y, VbFont_t *font);
|
|
|
|
/**
|
|
* Return a description of the recovery reason code.
|
|
*/
|
|
const char *RecoveryReasonString(uint8_t code);
|
|
|
|
/**
|
|
* Return a fixed string representing the HWID.
|
|
*/
|
|
const char *VbHWID(VbCommonParams *cparams);
|
|
|
|
/**
|
|
* Get the number of localizations in the GBB bitmap data.
|
|
*/
|
|
VbError_t VbGetLocalizationCount(VbCommonParams *cparams, uint32_t *count);
|
|
|
|
#endif /* VBOOT_REFERENCE_VBOOT_DISPLAY_H_ */
|
|
|