Re: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions
Yes, git automatically detects copying and moving files, as long as both halves of the action (remove + add) are in the same commit. There's a nice explanation here: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_git_mv Brian On 10/18/2016 12:59 AM, Kinney, Michael D wrote: Use 'git mv' command. Mike -Original Message- From: Ni, Ruiyu Sent: Tuesday, October 18, 2016 1:57 PM To: Carsey, Jaben <jaben.car...@intel.com>; edk2-devel@lists.01.org Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: RE: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions I don't want to lose the file history either. I thought git can auto-detect the copy/move of files. I will investigate further. Thanks/Ray -Original Message- From: Carsey, Jaben Sent: Tuesday, October 18, 2016 2:02 AM To: Ni, Ruiyu <ruiyu...@intel.com>; edk2-devel@lists.01.org Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen <jiewen@intel.com>; Carsey, Jaben <jaben.car...@intel.com> Subject: RE: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions Can we do a GIT move operation and then merge the content from ShellBase.h please? I do not want to lose the file history information. When we move by "delete" then "add" we lose everything for no reason. -Jaben -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni Sent: Friday, October 14, 2016 2:44 AM To: edk2-devel@lists.01.org Cc: Carsey, Jaben <jaben.car...@intel.com>; Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen <jiewen@intel.com> Subject: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions Importance: High Copy Shell/ShellDynamicCommand/ShellParameters definitions from ShellPkg to MdePkg. Content of ShellBase.h is moved to Protocol/Shell.h. The following patches will update ShellPkg to reference all protocol definition to MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> Cc: Jaben Carsey <jaben.car...@intel.com> Cc: Jiewen Yao <jiewen@intel.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> --- MdePkg/Include/Protocol/Shell.h | 1268 + MdePkg/Include/Protocol/ShellDynamicCommand.h | 85 ++ MdePkg/Include/Protocol/ShellParameters.h | 60 ++ MdePkg/MdePkg.dec | 15 + 4 files changed, 1428 insertions(+) create mode 100644 MdePkg/Include/Protocol/Shell.h create mode 100644 MdePkg/Include/Protocol/ShellDynamicCommand.h create mode 100644 MdePkg/Include/Protocol/ShellParameters.h diff --git a/MdePkg/Include/Protocol/Shell.h b/MdePkg/Include/Protocol/Shell.h new file mode 100644 index 000..cc1fbdc --- /dev/null +++ b/MdePkg/Include/Protocol/Shell.h @@ -0,0 +1,1268 @@ +/** @file + EFI Shell protocol as defined in the UEFI Shell 2.0 specification including errata. + + (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __EFI_SHELL_PROTOCOL__ +#define __EFI_SHELL_PROTOCOL__ + +#include + +#define EFI_SHELL_PROTOCOL_GUID \ + { \ + 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e } \ + } +typedef VOID *SHELL_FILE_HANDLE; + +typedef enum { + /// + /// The operation completed successfully. + /// + SHELL_SUCCESS = 0, + + /// + /// The image failed to load. + /// + SHELL_LOAD_ERROR= 1, + + /// + /// The parameter was incorrect. + /// + SHELL_INVALID_PARAMETER = 2, + + /// + /// The operation is not supported. + /// + SHELL_UNSUPPORTED = 3, + + /// + /// The buffer was not the proper size for the request. + /// + SHELL_BAD_BUFFER_SIZE = 4, + + /// + /// The buffer was not large enough to hold the requested data. + /// The required buffer size is returned in the appropriate + /// parameter when this error occurs. + /// + SHELL_BUFFER_TOO_SMALL = 5, + + /// + /// There is no data pending upon return. + /// + SHELL_NOT_READY = 6, + + /// + /// The physical device reported an error while attempting the + /// operation. + /// + SHELL_DEVICE_ERROR = 7, + + /// + /// The device cannot be written to. +
Re: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions
Use 'git mv' command. Mike > -Original Message- > From: Ni, Ruiyu > Sent: Tuesday, October 18, 2016 1:57 PM > To: Carsey, Jaben <jaben.car...@intel.com>; edk2-devel@lists.01.org > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen > <jiewen....@intel.com> > Subject: RE: [edk2] [PATCH 2/5] MdePkg: Include > Shell/ShellDynamicCommand/ShellParameters definitions > > I don't want to lose the file history either. > I thought git can auto-detect the copy/move of files. I will investigate > further. > > Thanks/Ray > > > -Original Message- > > From: Carsey, Jaben > > Sent: Tuesday, October 18, 2016 2:02 AM > > To: Ni, Ruiyu <ruiyu...@intel.com>; edk2-devel@lists.01.org > > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen > > <jiewen....@intel.com>; Carsey, Jaben <jaben.car...@intel.com> > > Subject: RE: [edk2] [PATCH 2/5] MdePkg: Include > > Shell/ShellDynamicCommand/ShellParameters definitions > > > > Can we do a GIT move operation and then merge the content from > > ShellBase.h please? I do not want to lose the file history information. > > > > When we move by "delete" then "add" we lose everything for no reason. > > > > -Jaben > > > > > -Original Message- > > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > > > Ruiyu Ni > > > Sent: Friday, October 14, 2016 2:44 AM > > > To: edk2-devel@lists.01.org > > > Cc: Carsey, Jaben <jaben.car...@intel.com>; Kinney, Michael D > > > <michael.d.kin...@intel.com>; Yao, Jiewen <jiewen@intel.com> > > > Subject: [edk2] [PATCH 2/5] MdePkg: Include > > > Shell/ShellDynamicCommand/ShellParameters definitions > > > Importance: High > > > > > > Copy Shell/ShellDynamicCommand/ShellParameters definitions from > > > ShellPkg to MdePkg. > > > Content of ShellBase.h is moved to Protocol/Shell.h. > > > > > > The following patches will update ShellPkg to reference all protocol > > > definition to MdePkg. > > > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > > Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> > > > Cc: Jaben Carsey <jaben.car...@intel.com> > > > Cc: Jiewen Yao <jiewen@intel.com> > > > Cc: Michael D Kinney <michael.d.kin...@intel.com> > > > --- > > > MdePkg/Include/Protocol/Shell.h | 1268 > > > + > > > MdePkg/Include/Protocol/ShellDynamicCommand.h | 85 ++ > > > MdePkg/Include/Protocol/ShellParameters.h | 60 ++ > > > MdePkg/MdePkg.dec | 15 + > > > 4 files changed, 1428 insertions(+) > > > create mode 100644 MdePkg/Include/Protocol/Shell.h > > > create mode 100644 MdePkg/Include/Protocol/ShellDynamicCommand.h > > > create mode 100644 MdePkg/Include/Protocol/ShellParameters.h > > > > > > diff --git a/MdePkg/Include/Protocol/Shell.h > > > b/MdePkg/Include/Protocol/Shell.h > > > new file mode 100644 > > > index 000..cc1fbdc > > > --- /dev/null > > > +++ b/MdePkg/Include/Protocol/Shell.h > > > @@ -0,0 +1,1268 @@ > > > +/** @file > > > + EFI Shell protocol as defined in the UEFI Shell 2.0 specification > > > including > > > errata. > > > + > > > + (C) Copyright 2014 Hewlett-Packard Development Company, L.P. > > > + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. > > > + 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 > > > + http://opensource.org/licenses/bsd-license.php > > > + > > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > > BASIS, > > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > > > EXPRESS OR IMPLIED. > > > + > > > +**/ > > > + > > > +#ifndef __EFI_SHELL_PROTOCOL__ > > > +#define __EFI_SHELL_PROTOCOL__ > > > + > > > +#include > > > + > > > +#define EFI_SHELL_PROTOCOL_GUID \ > > > + { \ > > > + 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, > > 0x4e > > > } \ > > > + } > > >
Re: [edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions
I don't want to lose the file history either. I thought git can auto-detect the copy/move of files. I will investigate further. Thanks/Ray > -Original Message- > From: Carsey, Jaben > Sent: Tuesday, October 18, 2016 2:02 AM > To: Ni, Ruiyu <ruiyu...@intel.com>; edk2-devel@lists.01.org > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen > <jiewen@intel.com>; Carsey, Jaben <jaben.car...@intel.com> > Subject: RE: [edk2] [PATCH 2/5] MdePkg: Include > Shell/ShellDynamicCommand/ShellParameters definitions > > Can we do a GIT move operation and then merge the content from > ShellBase.h please? I do not want to lose the file history information. > > When we move by "delete" then "add" we lose everything for no reason. > > -Jaben > > > -Original Message- > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > > Ruiyu Ni > > Sent: Friday, October 14, 2016 2:44 AM > > To: edk2-devel@lists.01.org > > Cc: Carsey, Jaben <jaben.car...@intel.com>; Kinney, Michael D > > <michael.d.kin...@intel.com>; Yao, Jiewen <jiewen@intel.com> > > Subject: [edk2] [PATCH 2/5] MdePkg: Include > > Shell/ShellDynamicCommand/ShellParameters definitions > > Importance: High > > > > Copy Shell/ShellDynamicCommand/ShellParameters definitions from > > ShellPkg to MdePkg. > > Content of ShellBase.h is moved to Protocol/Shell.h. > > > > The following patches will update ShellPkg to reference all protocol > > definition to MdePkg. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> > > Cc: Jaben Carsey <jaben.car...@intel.com> > > Cc: Jiewen Yao <jiewen@intel.com> > > Cc: Michael D Kinney <michael.d.kin...@intel.com> > > --- > > MdePkg/Include/Protocol/Shell.h | 1268 > > + > > MdePkg/Include/Protocol/ShellDynamicCommand.h | 85 ++ > > MdePkg/Include/Protocol/ShellParameters.h | 60 ++ > > MdePkg/MdePkg.dec | 15 + > > 4 files changed, 1428 insertions(+) > > create mode 100644 MdePkg/Include/Protocol/Shell.h > > create mode 100644 MdePkg/Include/Protocol/ShellDynamicCommand.h > > create mode 100644 MdePkg/Include/Protocol/ShellParameters.h > > > > diff --git a/MdePkg/Include/Protocol/Shell.h > > b/MdePkg/Include/Protocol/Shell.h > > new file mode 100644 > > index 000..cc1fbdc > > --- /dev/null > > +++ b/MdePkg/Include/Protocol/Shell.h > > @@ -0,0 +1,1268 @@ > > +/** @file > > + EFI Shell protocol as defined in the UEFI Shell 2.0 specification > > including > > errata. > > + > > + (C) Copyright 2014 Hewlett-Packard Development Company, L.P. > > + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. > > + 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 > > + http://opensource.org/licenses/bsd-license.php > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > BASIS, > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > > EXPRESS OR IMPLIED. > > + > > +**/ > > + > > +#ifndef __EFI_SHELL_PROTOCOL__ > > +#define __EFI_SHELL_PROTOCOL__ > > + > > +#include > > + > > +#define EFI_SHELL_PROTOCOL_GUID \ > > + { \ > > + 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, > 0x4e > > } \ > > + } > > +typedef VOID *SHELL_FILE_HANDLE; > > + > > +typedef enum { > > + /// > > + /// The operation completed successfully. > > + /// > > + SHELL_SUCCESS = 0, > > + > > + /// > > + /// The image failed to load. > > + /// > > + SHELL_LOAD_ERROR= 1, > > + > > + /// > > + /// The parameter was incorrect. > > + /// > > + SHELL_INVALID_PARAMETER = 2, > > + > > + /// > > + /// The operation is not supported. > > + /// > > + SHELL_UNSUPPORTED = 3, > > + > > + /// > > + /// The buffer was not the proper size for the request. > > + /// > > + SHELL_BAD_BUFFER_SIZE = 4, > > + > > + /// > > + /// The buffer was not large enough to hold the requested data. > > +
[edk2] [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions
Copy Shell/ShellDynamicCommand/ShellParameters definitions from ShellPkg to MdePkg. Content of ShellBase.h is moved to Protocol/Shell.h. The following patches will update ShellPkg to reference all protocol definition to MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu NiCc: Jaben Carsey Cc: Jiewen Yao Cc: Michael D Kinney --- MdePkg/Include/Protocol/Shell.h | 1268 + MdePkg/Include/Protocol/ShellDynamicCommand.h | 85 ++ MdePkg/Include/Protocol/ShellParameters.h | 60 ++ MdePkg/MdePkg.dec | 15 + 4 files changed, 1428 insertions(+) create mode 100644 MdePkg/Include/Protocol/Shell.h create mode 100644 MdePkg/Include/Protocol/ShellDynamicCommand.h create mode 100644 MdePkg/Include/Protocol/ShellParameters.h diff --git a/MdePkg/Include/Protocol/Shell.h b/MdePkg/Include/Protocol/Shell.h new file mode 100644 index 000..cc1fbdc --- /dev/null +++ b/MdePkg/Include/Protocol/Shell.h @@ -0,0 +1,1268 @@ +/** @file + EFI Shell protocol as defined in the UEFI Shell 2.0 specification including errata. + + (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __EFI_SHELL_PROTOCOL__ +#define __EFI_SHELL_PROTOCOL__ + +#include + +#define EFI_SHELL_PROTOCOL_GUID \ + { \ + 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e } \ + } +typedef VOID *SHELL_FILE_HANDLE; + +typedef enum { + /// + /// The operation completed successfully. + /// + SHELL_SUCCESS = 0, + + /// + /// The image failed to load. + /// + SHELL_LOAD_ERROR= 1, + + /// + /// The parameter was incorrect. + /// + SHELL_INVALID_PARAMETER = 2, + + /// + /// The operation is not supported. + /// + SHELL_UNSUPPORTED = 3, + + /// + /// The buffer was not the proper size for the request. + /// + SHELL_BAD_BUFFER_SIZE = 4, + + /// + /// The buffer was not large enough to hold the requested data. + /// The required buffer size is returned in the appropriate + /// parameter when this error occurs. + /// + SHELL_BUFFER_TOO_SMALL = 5, + + /// + /// There is no data pending upon return. + /// + SHELL_NOT_READY = 6, + + /// + /// The physical device reported an error while attempting the + /// operation. + /// + SHELL_DEVICE_ERROR = 7, + + /// + /// The device cannot be written to. + /// + SHELL_WRITE_PROTECTED = 8, + + /// + /// The resource has run out. + /// + SHELL_OUT_OF_RESOURCES = 9, + + /// + /// An inconsistency was detected on the file system causing the + /// operation to fail. + /// + SHELL_VOLUME_CORRUPTED = 10, + + /// + /// There is no more space on the file system. + /// + SHELL_VOLUME_FULL = 11, + + /// + /// The device does not contain any medium to perform the + /// operation. + /// + SHELL_NO_MEDIA = 12, + + /// + /// The medium in the device has changed since the last + /// access. + /// + SHELL_MEDIA_CHANGED = 13, + + /// + /// The item was not found. + /// + SHELL_NOT_FOUND = 14, + + /// + /// Access was denied. + /// + SHELL_ACCESS_DENIED = 15, + + // note the skipping of 16 and 17 + + /// + /// A timeout time expired. + /// + SHELL_TIMEOUT = 18, + + /// + /// The protocol has not been started. + /// + SHELL_NOT_STARTED = 19, + + /// + /// The protocol has already been started. + /// + SHELL_ALREADY_STARTED = 20, + + /// + /// The operation was aborted. + /// + SHELL_ABORTED = 21, + + // note the skipping of 22, 23, and 24 + + /// + /// A function encountered an internal version that was + /// incompatible with a version requested by the caller. + /// + SHELL_INCOMPATIBLE_VERSION = 25, + + /// + /// The function was not performed due to a security violation. + /// + SHELL_SECURITY_VIOLATION= 26, + + /// + /// The function was performed and resulted in an unequal + /// comparison.. + /// + SHELL_NOT_EQUAL = 27 +} SHELL_STATUS; + + +// replaced EFI_LIST_ENTRY with LIST_ENTRY for simplicity. +// they are identical outside of the name. +typedef struct { + LIST_ENTRYLink; ///< Linked list members. + EFI_STATUSStatus; ///< Status of opening the file. Valid only if Handle