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

Go to the source code of this file.

Functions

BOOLEAN IsStdInDataAvailable (VOID)
 
EFI_STRING HandleStringWithEscapeCharForParse (IN CHAR16 *String)
 
SHELL_STATUS PerformParsing (IN CONST CHAR16 *FileName, IN CONST CHAR16 *TableName, IN CONST UINTN ColumnIndex, IN CONST UINTN TableNameInstance, IN CONST UINTN ShellCommandInstance, IN BOOLEAN StreamingUnicode)
 
SHELL_STATUS EFIAPI ShellCommandRunParse (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC CONST SHELL_PARAM_ITEM ParamList []
 

Detailed Description

Main file for Parse shell level 2 function.

(C) Copyright 2013-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 Parse.c.

Function Documentation

◆ HandleStringWithEscapeCharForParse()

EFI_STRING HandleStringWithEscapeCharForParse ( IN CHAR16 *  String)

Handle stings for SFO Output with escape character ^ in a string

  1. Quotation marks in the string must be escaped by using a ^ character (i.e. ^").
  2. The ^ character may be inserted using ^^.
Parameters
[in]StringThe Unicode NULL-terminated string.
Return values
NewStringThe new string handled for SFO.

Definition at line 63 of file Parse.c.

◆ IsStdInDataAvailable()

BOOLEAN IsStdInDataAvailable ( VOID  )

Check if data is coming from StdIn output.

Parameters
[in]None
Return values
TRUEStdIn stream data available to parse
FALSEStdIn stream data is not available to parse.

Definition at line 21 of file Parse.c.

◆ PerformParsing()

SHELL_STATUS PerformParsing ( IN CONST CHAR16 *  FileName,
IN CONST CHAR16 *  TableName,
IN CONST UINTN  ColumnIndex,
IN CONST UINTN  TableNameInstance,
IN CONST UINTN  ShellCommandInstance,
IN BOOLEAN  StreamingUnicode 
)

Do the actual parsing of the file. the file should be SFO output from a shell command or a similar format.

Parameters
[in]FileNameThe filename to open.
[in]TableNameThe name of the table to find.
[in]ColumnIndexThe column number to get.
[in]TableNameInstanceWhich instance of the table to get (row).
[in]ShellCommandInstanceWhich instance of the command to get.
[in]StreamingUnicodeIndicates Input file is StdIn Unicode streaming data or not
Return values
SHELL_NOT_FOUNDThe requested instance was not found.
SHELL_SUCCESSThe operation was successful.

Definition at line 115 of file Parse.c.

◆ ShellCommandRunParse()

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

Function for 'parse' command.

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

Definition at line 245 of file Parse.c.

Variable Documentation

◆ ParamList

Initial value:
= {
{ L"-i", TypeValue },
{ L"-s", 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

Definition at line 231 of file Parse.c.