/* Print out each alias registered with the Shell. */
SHELL_STATUS PrintAllShellAlias(VOID)
/* Print out each alias registered with the Shell. */
SHELL_STATUS PrintAllShellAlias(VOID)
{
  CONST CHAR16  *ConstAllAliasList;
  CHAR16        *Alias;
  CHAR16        *Walker;
  ConstAllAliasList = gEfiShellProtocol->GetAlias (NULL, NULL);
  if (ConstAllAliasList == NULL) {
    return (SHELL_SUCCESS);
  }
  Alias = AllocateZeroPool (StrSize (ConstAllAliasList));
  if (Alias == NULL) {
    return (SHELL_OUT_OF_RESOURCES);
  }
  Walker = (CHAR16 *)ConstAllAliasList;
  do {
    CopyMem (Alias, Walker, StrSize (Walker));
    Walker = StrStr (Alias, L";");
    if (Walker != NULL) {
      Walker[0] = CHAR_NULL;
      Walker    = Walker + 1;
    }
    PrintSingleShellAlias (Alias);
  } while (Walker != NULL && Walker[0] != CHAR_NULL);
  FreePool (Alias);
  return (SHELL_SUCCESS);
}