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

Unified Diff: src/platform/vboot_reference/common/utility_stub.c

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 | « no previous file | src/platform/vboot_reference/include/firmware_image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/common/utility_stub.c
diff --git a/src/platform/vboot_reference/common/utility_stub.c b/src/platform/vboot_reference/common/utility_stub.c
index 2d01226fb20837f237c80ca1ffdc3d28973867ba..d2244c797b2d43549a9531e57e367feb77c05890 100644
--- a/src/platform/vboot_reference/common/utility_stub.c
+++ b/src/platform/vboot_reference/common/utility_stub.c
@@ -8,9 +8,27 @@
#include "utility.h"
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+void error(const char *format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ fprintf(stderr, "ERROR: ");
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ exit(1);
+}
+
+void debug(const char *format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ fprintf(stderr, "WARNING: ");
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+}
+
void* Malloc(size_t size) {
void* p = malloc(size);
if (!p) {
« no previous file with comments | « no previous file | src/platform/vboot_reference/include/firmware_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698