Allow multiple calls to console::status_* functions

This commit is contained in:
Justin C. Miller
2020-02-22 17:52:51 -08:00
parent 570638bba6
commit ec563ea8e4
3 changed files with 46 additions and 27 deletions

View File

@@ -12,9 +12,9 @@ public:
console(uefi::boot_services *bs, uefi::protos::simple_text_output *out);
void status_begin(const wchar_t *message);
void status_fail(const wchar_t *message, const wchar_t *error=nullptr) const;
void status_warn(const wchar_t *message, const wchar_t *error=nullptr) const;
void status_ok() const;
void status_warn(const wchar_t *message, const wchar_t *error=nullptr);
void status_fail(const wchar_t *message, const wchar_t *error=nullptr);
void status_end();
size_t print_hex(uint32_t n) const;
size_t print_dec(uint32_t n) const;
@@ -22,7 +22,7 @@ public:
size_t print_long_dec(uint64_t n) const;
size_t printf(const wchar_t *fmt, ...) const;
static const console & get() { return *s_console; }
static console & get() { return *s_console; }
static size_t print(const wchar_t *fmt, ...);
private:
@@ -30,7 +30,10 @@ private:
size_t vprintf(const wchar_t *fmt, va_list args) const;
size_t m_rows, m_cols;
int m_current_status_line;
int m_status_level;
int m_status_line;
uefi::protos::simple_text_output *m_out;
static console *s_console;