21 Commits
Author SHA1 Message Date
Laszlo Ersek c44501b313 ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE
The UefiShell*CommandsLib instances have constructor functions that do
something like:

  gHiiHandle = HiiAddPackages (...);
  ...
  ShellCommandRegisterCommandName (..., gHiiHandle, ...);

and destructor functions that implement the following pattern:

  HiiRemovePackages (gHiiHandle);

The -- semantic, not functional -- problem is that "gHiiHandle" is
declared with type EFI_HANDLE, and not EFI_HII_HANDLE, in all of these
library instances, even though HiiAddPackages() correctly returns
EFI_HII_HANDLE, and HiiRemovePackages() takes EFI_HII_HANDLE.

Once we fix the type of "gHiiHandle", it causes sort of a butterfly
effect, because it is passed around widely. Track down and update all of
those locations.

The DynamicCommand lib instances use a similar pattern, so they are
affected too.

NOTE: in practice, this patch is a no-op, as both EFI_HII_HANDLE and
EFI_HANDLE are typedefs to (VOID*). However, we shouldn't use EFI_HANDLE
where semantically EFI_HII_HANDLE is passed around.

Cc: Jaben Carsey <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zhichao Gao <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Philippe Mathieu-Daude <[email protected]>
Reviewed-by: Zhichao Gao <[email protected]>
2019-10-09 09:40:10 +02:00
Liming Gao 911efe279e ShellPkg: Add NetworkPkg/NetworkPkg.dec as the package dependency
NetLib will be moved from MdeModulePkg and NetworkPkg.
So, the module that consumes NetLib need to depend on NetworkPkg.dec.

Signed-off-by: Liming Gao <[email protected]>
Cc: Zhichao Gao <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Jaben Carsey <[email protected]>
Reviewed-by: Zhichao Gao <[email protected]>
2019-05-21 10:35:15 +08:00
Michael D Kinney 56ba37463a ShellPkg: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
2019-04-09 10:58:25 -07:00
Liming Gao ba0014b9f8 ShellPkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>
2018-06-28 11:19:51 +08:00
fanwang2 66c5613c91 ShellPkg: Fix a build error in Ping6 shell command.
Last check in involved a build error, this patch is to
fix this issue.

Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>
2017-12-18 17:52:02 +08:00
fanwang2 0f1e07ee63 ShellPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting
state handling, and it is forward compatible. So apply this Api in ShellPkg.

V2:
   *Define time period in a macro instead of hard code.

Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Signed-off-by: fanwang2 <[email protected]>
2017-12-18 16:38:24 +08:00
Fu Siyuan 5d8aa7eb6f ShellPkg: Add error message if failed to place receive token in ping command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <[email protected]>
Reviewed-by: Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
2017-11-16 14:07:31 +08:00
hegdenag 1f48070740 ShellPkg/Ifconfig6: Update error message and add a new line
If DAD failed, we print "It failed to set", print the IPv6
address and exit. We need a better error string
and also, after printing the IPv6 address, we need a new line
else the Shell> prompt will overwrite the IPv6 address. Fixed
these issues in this patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <[email protected]>
Reviewed-by: Sriram Subramanian <[email protected]>
Reviewed-by: Wu Jiaxin <[email protected]>
2017-09-12 16:41:08 +08:00
hegdenag 521981ee76 ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check
When we issue 'ifconfig6 -s <interface> auto' system hangs with
an ASSERT in StrLen. in IfConfig6SetInterfaceInfo, for 'auto' case
we added checks to rule out the invalid inputs like 'host', 'gw'
and 'dns'. To parse through this, we do a VarArg = VarArg->Next but
we dont check new VarArg before calling StrCmp. Fix with a check
in this patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <[email protected]>
Reviewed-by: Zhang Lubo <[email protected]>
Reviewed-by: Wu Jiaxin <[email protected]>
Reviewed-by: Sriram Subramanian <[email protected]>
2017-01-13 09:40:48 +08:00
Dandan Bi 150d35eb16 ShellPkg/UefiShellNetwork2CommandsLib: Fix incorrect Protocol format
Cc: Fu Siyuan <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
2016-12-14 21:34:34 +08:00
Gary Lin 69f6787b0d ShellPkg: Assign the correct value to ShellStatus
Since the type of ShellStatus is SHELL_STATUS, we should use
SHELL_INVALID_PARAMETER instead of EFI_INVALID_PARAMETER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <[email protected]>
Cc: Zhang Lubo <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: Zhang Lubo <[email protected]>
Reviewed-by: Wu Jiaxin <[email protected]>
2016-12-09 10:10:39 +08:00
Zhang Lubo 445d200762 ShellPkg: Add error prompt message in Ifconfig6 command.
v2: update the prompt message more readable.

It should display error prompt message when Ifconfig6 can
not configure correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Reviewed by : Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Hegde Nagaraj P <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
2016-12-06 18:37:50 +08:00
Zhang Lubo 825f09b762 ShellPkg: update ping6 to use timer service instead of timer arch protocol .
This patch update the shell ping command to use timer service to calculate the
RTT time, instead of using the timer arch protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Cc: Ni Ruiyu <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
2016-11-23 14:01:32 +08:00
Gary Lin 268d344557 ShellPkg: Fix typos in comments and variables
- funciton -> function
- paramter -> parameter
- supresses -> suppresses
- Seperator -> Separator
- permenant -> permanent

Reviewed-by: Jaben Carsey <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <[email protected]>
2016-11-15 11:05:34 +08:00
hegdenag d66f85cb5e ShellPkg/Ping6: Add a note in help for TargetIp
'Ping6 TargetIp' is a valid command input but we bail out
when TargetIp is a link local address because we would want
the user to specify the NIC (via SourceIp) through which
he/she would want to ping to TargetIp. This patch updates
the help text to mention the same.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
2016-11-07 10:21:59 -08:00
Ruiyu Ni e7a5a238c3 ShellPkg/Ping6: Handle memory allocation failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
2016-07-18 11:04:22 +08:00
Ruiyu Ni a915fea68e ShellPkg/Ifconfig6: Handle memory allocation failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
2016-07-18 11:04:19 +08:00
Zhang Lubo e2f5c491d8 ShellPkg: Fix issue about Ifconfig6 -r command.
Follow the Shell Spec, when the interface name is Specified,
we need to refresh the Ipv6 configuration.

Cc: Hegde Nagaraj P <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Reviewed-by: Hegde Nagaraj P <[email protected]>
Reviewed-by: Sriram Subramanian <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Reviewed-By: Wu Jiaxin <[email protected]>
2016-07-15 14:45:55 +08:00
Zhang Lubo dded3ae880 ShellPkg: Update the error prompt for ping6 command.
when we use the ping6 command without configuring the network
interface, it should give correct prompt to users.

Cc: Hegde Nagaraj P <[email protected]>
Cc: Fu Siyuan <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Reviewed-by: Sriram Subramanian <[email protected]>
Reviewed-by: Hegde, Nagaraj P <[email protected]>
Reviewed-By: Wu Jiaxin <[email protected]>
2016-07-05 16:48:31 +08:00
Jiaxin Wu 76cd3ffab6 ShellPkg: Enhance ping6 to select the interface automatically
v2:
* Refine the code to make it more readable.

This patch is used to support no source IP specified case while
multiple NICs existed in the platform. The command will select the
first both connected and configured interface automatically.
Note: Source address is always required when pinging a
link-local address.

Cc: Bhupesh Sharma <[email protected]>
Cc: Jaben Carsey <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
2016-04-29 11:32:35 +08:00
Zhang, Lubo 43ca17532b ShellPkg: Merge Ping6 and Ifconfig6 tools to Shell command.
According to the new Shell spec, we add Network2 profile and
merge Ping6 and Ifconfig6 tools to Shell command.

Cc: Carsey Jaben <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <[email protected]>
Reviewed-By: Jaben Carsey <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>
2016-03-08 15:01:29 +08:00