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) { |