From d6a10b886f4cb64e1291a6ca87ffaa238c07a449 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Tue, 30 Nov 2021 17:09:14 +0300 Subject: panel: add support for displaying file systems --- Library/UefiShellUfmCommandLib/panel.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Library/UefiShellUfmCommandLib') diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c index 521bdaf..b02bddb 100644 --- a/Library/UefiShellUfmCommandLib/panel.c +++ b/Library/UefiShellUfmCommandLib/panel.c @@ -23,6 +23,24 @@ #define UNHIGHLIGHT_LINE_AS_MARK(panel, line) \ highlight_line(panel, line, EFI_LIGHTGRAY, -1) +STATIC VOID display_fs(struct panel_ctx *p, UINTN start_index) +{ + UINTN line, i; + + for(line = 0, i = start_index - 1; line < p->list_lines; line++, i++) + { + if(i >= p->fsa->len) { + clear_list_line(p, line); + continue; + } + + mvwprintf(p->wlist, 0, line, L"%-*s%c%*s%c%*s", + p->name_cols, p->fsa->full_name[i], BOXDRAW_VERTICAL, + SIZE_COLS, L"", BOXDRAW_VERTICAL, + MODIFYTIME_COLS, L""); + } +} + STATIC VOID highlight_line(struct panel_ctx *p, UINTN line, INT32 fg, INT32 bg) { CHAR16 *str; -- cgit v1.2.3-18-g5258