Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: src/platform/vboot_reference/include/utility.h

Issue 1599001: VBoot Reference: Refactor Pass 1: Split {firmware|kernel}_image (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/vboot_reference/include/tlcl.h ('k') | src/platform/vboot_reference/tests/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/include/utility.h
diff --git a/src/platform/vboot_reference/include/utility.h b/src/platform/vboot_reference/include/utility.h
index 429223cdf1ae571367982a7553b9ebfcee8f1931..8619cd219899b77991f1ef4a8d07ab1dc454252b 100644
--- a/src/platform/vboot_reference/include/utility.h
+++ b/src/platform/vboot_reference/include/utility.h
@@ -10,9 +10,20 @@
#ifndef VBOOT_REFERENCE_UTILITY_H_
#define VBOOT_REFERENCE_UTILITY_H_
-#include <inttypes.h>
+#include <stdint.h>
#include <string.h>
+/* Outputs an error message and quits. */
+void error(const char *format, ...);
+
+/* Outputs debug/warning messages. */
+void debug(const char *format, ...);
+
+
+#define assert(expr) do { if (!(expr)) { \
+ error("assert fail: %s at %s:%d\n", \
+ #expr, __FILE__, __LINE__); }} while(0)
+
/* Combine [msw] and [lsw] uint16s to a uint32_t with its [msw] and
* [lsw] forming the most and least signficant 16-bit words.
*/
« no previous file with comments | « src/platform/vboot_reference/include/tlcl.h ('k') | src/platform/vboot_reference/tests/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698