TianoCore EDK2 master
Loading...
Searching...
No Matches
AppSupport.c File Reference
#include "CapsuleApp.h"

Go to the source code of this file.

Functions

EFI_STATUS GetArg (VOID)
 
EFI_SHELL_PROTOCOLGetShellProtocol (VOID)
 
EFI_STATUS ReadFileToBuffer (IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer)
 
EFI_STATUS WriteFileFromBuffer (IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer)
 

Variables

UINTN Argc
 
CHAR16 ** Argv
 
EFI_SHELL_PROTOCOLmShellProtocol = NULL
 

Detailed Description

A shell application that triggers capsule update process.

Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AppSupport.c.

Function Documentation

◆ GetArg()

EFI_STATUS GetArg ( VOID  )

This function parse application ARG.

Returns
Status

Definition at line 22 of file AppSupport.c.

◆ GetShellProtocol()

EFI_SHELL_PROTOCOL * GetShellProtocol ( VOID  )

Get shell protocol.

Returns
Pointer to shell protocol.

Definition at line 49 of file AppSupport.c.

◆ ReadFileToBuffer()

EFI_STATUS ReadFileToBuffer ( IN CHAR16 *  FileName,
OUT UINTN BufferSize,
OUT VOID **  Buffer 
)

Read a file.

Parameters
[in]FileNameThe file to be read.
[out]BufferSizeThe file buffer size
[out]BufferThe file buffer
Return values
EFI_SUCCESSRead file successfully
EFI_NOT_FOUNDShell protocol or file not found
othersRead file failed

Definition at line 81 of file AppSupport.c.

◆ WriteFileFromBuffer()

EFI_STATUS WriteFileFromBuffer ( IN CHAR16 *  FileName,
IN UINTN  BufferSize,
IN VOID *  Buffer 
)

Write a file.

Parameters
[in]FileNameThe file to be written.
[in]BufferSizeThe file buffer size
[in]BufferThe file buffer
Return values
EFI_SUCCESSWrite file successfully
EFI_NOT_FOUNDShell protocol not found
othersWrite file failed

Definition at line 159 of file AppSupport.c.

Variable Documentation

◆ Argc

UINTN Argc

Definition at line 11 of file AppSupport.c.

◆ Argv

CHAR16** Argv

Definition at line 12 of file AppSupport.c.

◆ mShellProtocol

EFI_SHELL_PROTOCOL* mShellProtocol = NULL

Definition at line 13 of file AppSupport.c.