ShellCTestApp.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @file
  2. This is a test application that demonstrates how to use the C-style entry point
  3. for a shell application.
  4. Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #include <Uefi.h>
  8. #include <Library/UefiLib.h>
  9. #include <Library/DebugLib.h>
  10. #include <Library/ShellCEntryLib.h>
  11. /**
  12. UEFI application entry point which has an interface similar to a
  13. standard C main function.
  14. The ShellCEntryLib library instance wrappers the actual UEFI application
  15. entry point and calls this ShellAppMain function.
  16. @param[in] Argc The number of items in Argv.
  17. @param[in] Argv Array of pointers to strings.
  18. @retval 0 The application exited normally.
  19. @retval Other An error occurred.
  20. **/
  21. INTN
  22. EFIAPI
  23. ShellAppMain (
  24. IN UINTN Argc,
  25. IN CHAR16 **Argv
  26. )
  27. {
  28. UINTN Index;
  29. if (Argc == 1) {
  30. Print (L"Argv[1] = NULL\n");
  31. }
  32. for (Index = 1; Index < Argc; Index++) {
  33. Print (L"Argv[%d]: \"%s\"\n", Index, Argv[Index]);
  34. }
  35. return 0;
  36. }