mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
This is a mostly NOOP change which modifies the source code to compile cleanly in the MSVC command line build environment. A new makefile is introduced (msc/nmakefile) along with a README.txt in the same directory explaining how to build the code in the DOS window. As of this submission the build is running in a 32 bit environment, the intention is to use the same makefile for 64 bit builds in the future. Enabling high compilation warnings level allowed to identify a couple of bugs in the code which are being fixed. Not all sources are being compiled in the MSVC environment, only those in firmware/ and most of those in test/ subdirectories. The benchmark calculations require porting of the timer facilities and are being postponed. TEST Built in DOS and linux environments. Ran unit tests in linux environment. Review URL: http://codereview.chromium.org/2809037
29 lines
775 B
C
29 lines
775 B
C
/* Copyright (c) 2010 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.
|
|
*
|
|
* Host-side misc functions for verified boot.
|
|
*/
|
|
|
|
#ifndef VBOOT_REFERENCE_HOST_MISC_H_
|
|
#define VBOOT_REFERENCE_HOST_MISC_H_
|
|
|
|
#include "utility.h"
|
|
#include "vboot_struct.h"
|
|
|
|
|
|
/* Read data from [filename]. Store the size of returned data in [size].
|
|
*
|
|
* Returns the data buffer, which the caller must Free(), or NULL if
|
|
* error. */
|
|
uint8_t* ReadFile(const char* filename, uint64_t* size);
|
|
|
|
|
|
/* Writes [size] bytes of [data] to [filename].
|
|
*
|
|
* Returns 0 if success, 1 if error. */
|
|
int WriteFile(const char* filename, const void *data, uint64_t size);
|
|
|
|
|
|
#endif /* VBOOT_REFERENCE_HOST_MISC_H_ */
|