TianoCore EDK2 master
Loading...
Searching...
No Matches
Alias.c File Reference

Go to the source code of this file.

Functions

SHELL_STATUS PrintSingleShellAlias (IN CONST CHAR16 *Alias)
 
SHELL_STATUS PrintAllShellAlias (VOID)
 
SHELL_STATUS ShellLevel3CommandsLibSetAlias (IN CONST CHAR16 *Command, IN CONST CHAR16 *Alias, IN BOOLEAN Replace, IN BOOLEAN Volatile)
 
SHELL_STATUS EFIAPI ShellCommandRunAlias (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC CONST SHELL_PARAM_ITEM ParamList []
 

Detailed Description

Main file for Alias shell level 3 function.

(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Alias.c.

Function Documentation

◆ PrintAllShellAlias()

SHELL_STATUS PrintAllShellAlias ( VOID  )

Print out each alias registered with the Shell.

Return values
STATUS_SUCCESSthe printout was successful
Returns
any return code from GetNextVariableName except EFI_NOT_FOUND

Definition at line 54 of file Alias.c.

◆ PrintSingleShellAlias()

SHELL_STATUS PrintSingleShellAlias ( IN CONST CHAR16 *  Alias)

Print out single alias registered with the Shell.

Parameters
[in]AliasPoints to the NULL-terminated shell alias. If this parameter is NULL, then all aliases will be returned in ReturnedData.
Return values
SHELL_SUCCESSthe printout was successful

Definition at line 23 of file Alias.c.

◆ ShellCommandRunAlias()

SHELL_STATUS EFIAPI ShellCommandRunAlias ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'alias' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 154 of file Alias.c.

◆ ShellLevel3CommandsLibSetAlias()

SHELL_STATUS ShellLevel3CommandsLibSetAlias ( IN CONST CHAR16 *  Command,
IN CONST CHAR16 *  Alias,
IN BOOLEAN  Replace,
IN BOOLEAN  Volatile 
)

Changes a shell command alias.

This function creates an alias for a shell command or if Alias is NULL it will delete an existing alias.

Parameters
[in]CommandPoints to the NULL-terminated shell command or existing alias.
[in]AliasPoints to the NULL-terminated alias for the shell command. If this is NULL, and Command refers to an alias, that alias will be deleted.
[in]ReplaceIf TRUE and the alias already exists, then the existing alias will be replaced. If FALSE and the alias already exists, then the existing alias is unchanged and EFI_ACCESS_DENIED is returned.
[in]Volatileif TRUE the Alias being set will be stored in a volatile fashion. if FALSE the Alias being set will be stored in a non-volatile fashion.
Return values
SHELL_SUCCESSAlias created or deleted successfully.
SHELL_NOT_FOUNDthe Alias intended to be deleted was not found
SHELL_ACCESS_DENIEDThe alias is a built-in alias or already existed and Replace was set to FALSE.
SHELL_DEVICE_ERRORCommand is null or the empty string.

Definition at line 112 of file Alias.c.

Variable Documentation

◆ ParamList

Initial value:
= {
{ L"-v", TypeFlag },
{ L"-d", TypeValue },
{ NULL, TypeMax }
}
#define NULL
Definition: Base.h:319
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
Definition: ShellLib.h:700
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699

Definition at line 140 of file Alias.c.