public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: "Jim.Dailey@dell.com" <Jim.Dailey@dell.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>
Subject: Re: [PATCH] ShellPkg-Cd: Ensure all valid cd targets are handled properly
Date: Mon, 8 Oct 2018 14:53:46 +0000	[thread overview]
Message-ID: <CB6E33457884FA40993F35157061515CA415F3D9@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <7c3028cd2495469badb355a79423080e@ausx13mps335.AMER.DELL.COM>

Seems good to me.

Any thoughts Ray?

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: Jim.Dailey@dell.com [mailto:Jim.Dailey@dell.com]
> Sent: Thursday, October 04, 2018 9:47 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [edk2] [PATCH] ShellPkg-Cd: Ensure all valid cd targets are handled
> properly
> Importance: High
> 
> ShellPkg-Cd: Ensure all valid cd targets are handled properly
> 
> Make sure that PathCleanUpDirectories() is called on all valid targets
> of the cd command.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jim Dailey <jim_dailey@dell.com>
> ---
>  ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
> b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
> index 79dd2096f4..1eb7056aee 100644
> --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
> +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
> @@ -4,6 +4,7 @@
>    (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
>    (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
>    Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2018, Dell Technologies. All rights reserved.<BR>
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the BSD
> License
>    which accompanies this distribution.  The full text of the license may be
> found at
> @@ -261,9 +262,6 @@ ShellCommandRunCd (
> 
>          if (Param1Copy != NULL && IsCurrentFileSystem (Param1Copy, Cwd)) {
>            Status = ReplaceDriveWithCwd (&Param1Copy,Cwd);
> -          if (!EFI_ERROR (Status)) {
> -            Param1Copy = PathCleanUpDirectories (Param1Copy);
> -          }
>          } else {
>            //
>            // Can't use cd command to change filesystem.
> @@ -302,13 +300,15 @@ ShellCommandRunCd (
>                  StrCatS (TempBuffer, TotalSize / sizeof (CHAR16), Param1Copy);
> 
>                  FreePool (Param1Copy);
> -                Param1Copy = PathCleanUpDirectories (TempBuffer);
> +                Param1Copy = TempBuffer;
> +                TempBuffer = NULL;
>                }
>              }
>            }
>          }
> 
>          if (!EFI_ERROR(Status)) {
> +          Param1Copy = PathCleanUpDirectories (Param1Copy);
>            Status = ExtractDriveAndPath (Param1Copy, &Drive, &Path);
>          }
> 
> --
> 2.17.0.windows.1



  reply	other threads:[~2018-10-08 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 16:46 [PATCH] ShellPkg-Cd: Ensure all valid cd targets are handled properly Jim.Dailey
2018-10-08 14:53 ` Carsey, Jaben [this message]
2018-10-12  5:46   ` Ni, Ruiyu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB6E33457884FA40993F35157061515CA415F3D9@FMSMSX103.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox