diff options
author | Joursoir <chat@joursoir.net> | 2021-11-30 17:09:14 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-11-30 17:36:15 +0300 |
commit | d6a10b886f4cb64e1291a6ca87ffaa238c07a449 (patch) | |
tree | 03301eb75b4439efec5e6651083dd38e116143b3 /Library | |
parent | 07a9d2830240a63a23ab7f7f29ac405e34eb9756 (diff) | |
download | ufm-d6a10b886f4cb64e1291a6ca87ffaa238c07a449.tar.gz ufm-d6a10b886f4cb64e1291a6ca87ffaa238c07a449.tar.bz2 ufm-d6a10b886f4cb64e1291a6ca87ffaa238c07a449.zip |
panel: add support for displaying file systems
Diffstat (limited to 'Library')
-rw-r--r-- | Library/UefiShellUfmCommandLib/panel.c | 18 |
1 files changed, 18 insertions, 0 deletions
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"<fsys>", BOXDRAW_VERTICAL, + MODIFYTIME_COLS, L""); + } +} + STATIC VOID highlight_line(struct panel_ctx *p, UINTN line, INT32 fg, INT32 bg) { CHAR16 *str; |