eficonfig: fix going one directory up issue
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Fri, 2 Dec 2022 04:59:33 +0000 (13:59 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 2 Dec 2022 18:17:25 +0000 (19:17 +0100)
The directory name in eficonfig menu entry contains the
'\' separator. strcmp() argument ".." is wrong and one directory
up handling does not work correctly. strcmp() argument must
include '\' separator.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
cmd/eficonfig.c

index 97d3559..5529edc 100644 (file)
@@ -488,7 +488,7 @@ static efi_status_t eficonfig_file_selected(void *data)
        if (!info)
                return EFI_INVALID_PARAMETER;
 
-       if (!strcmp(info->file_name, "..")) {
+       if (!strcmp(info->file_name, "..\\")) {
                struct eficonfig_filepath_info *iter;
                struct list_head *pos, *n;
                int is_last;