aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib
diff options
context:
space:
mode:
Diffstat (limited to 'Library/UefiShellUfmCommandLib')
-rw-r--r--Library/UefiShellUfmCommandLib/panel.c5
-rw-r--r--Library/UefiShellUfmCommandLib/panel.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c
index 3c6cc6c..66f3b13 100644
--- a/Library/UefiShellUfmCommandLib/panel.c
+++ b/Library/UefiShellUfmCommandLib/panel.c
@@ -70,14 +70,13 @@ struct panel_ctx *panel_alloc(struct screen *scr, CONST CHAR16 *path,
return NULL;
}
- panel->cwd = path;
panel->name_cols = name_cols;
panel->curline = 1;
panel->list_lines = lines - 5;
panel->start_entry = 1;
wrefresh(panel->wbg);
- res = panel_show(panel, panel->cwd);
+ res = panel_show(panel, path);
if(!res) {
panel_release(panel);
return NULL;
@@ -99,6 +98,8 @@ VOID panel_release(struct panel_ctx *p)
delwin(p->wfname);
if(p->wmarked)
delwin(p->wmarked);
+ if(p->cwd)
+ FreePool(p->cwd);
FreePool(p);
}
diff --git a/Library/UefiShellUfmCommandLib/panel.h b/Library/UefiShellUfmCommandLib/panel.h
index 17a3469..2706dd6 100644
--- a/Library/UefiShellUfmCommandLib/panel.h
+++ b/Library/UefiShellUfmCommandLib/panel.h
@@ -9,12 +9,12 @@ struct dir_list;
struct fs_array;
struct panel_ctx {
- BOOLEAN show_fs; // is filesystems showing now?
struct window *wbg; // static window
struct window *wcwd, *wlist, *wfname, *wmarked; // dynamic windows
UINTN name_cols;
- CONST CHAR16 *cwd; // current work directory
+ CHAR16 *cwd; // current work directory
+ // if cwd == NULL then we are showing filesystems now
UINTN curline; // current line
struct dir_list *dirs; // directory contents