blob: c719df2b5f8af87ab84f25c1bec66f623fd6afcc [file] [log] [blame]
Aaron Wisnerdb511202018-06-26 15:38:35 -05001#pragma once
2
3#include <inttypes.h>
4#include <stdlib.h>
5
6#include <string>
7
8#include <bootimg.h>
9
10/* util stuff */
11double now();
Aaron Wisnerdb511202018-06-26 15:38:35 -050012void set_verbose();
13
Aaron Wisnerdb511202018-06-26 15:38:35 -050014// These printf-like functions are implemented in terms of vsnprintf, so they
15// use the same attribute for compile-time format string checking.
16void die(const char* fmt, ...) __attribute__((__noreturn__))
17__attribute__((__format__(__printf__, 1, 2)));
David Anderson7c84b9f2019-06-27 22:15:29 -070018
Aaron Wisnerdb511202018-06-26 15:38:35 -050019void verbose(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
David Anderson7c84b9f2019-06-27 22:15:29 -070020
21void die(const std::string& str) __attribute__((__noreturn__));