int main(int argc, char** argv) { // display a welcome message DisplayWelcome(std::cout); // display a goodbye message DisplayGoodbye(std::cout); return 0; }
INTN EFIAPI ShellAppMain( IN UINTN Argc, IN CHAR16 **Argv ) { EFI_STATUS Status; UINTN Index; UINTN Size; UINT8 CmdBuffer[BUFFERSIZE]; UINT8 ResBuffer[BUFFERSIZE]; Size = Argc - 1; if(Argc < 2){ DisplayWelcome(); return (0); } Status = FormlizeParameters(Argc, Argv, CmdBuffer); if(EFI_ERROR(Status)){ Print(L"Error: Parameters Checked Failed\n"); Print(L" Only Hex Letters Accepted and less than 0xFF\n"); return (0); } Status = KcsTransfer(CmdBuffer, ResBuffer, &Size); if(EFI_ERROR(Status)){ return (0); } Print(L"Response: "); for(Index = 0; Index < Size; Index++){ Print(L"%X ", ResBuffer[Index]); } Print(L"\n"); return (0); }