Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1998 Intel Corporation
  3. Module Name:
  4. itestcmd.c
  5. Abstract:
  6. Shell app "itestcmd"
  7. Author:
  8. Revision History
  9. --*/
  10. #include "shell.h"
  11. EFI_STATUS
  12. InitializeInternalTestCommand (
  13. IN EFI_HANDLE ImageHandle,
  14. IN EFI_SYSTEM_TABLE *SystemTable
  15. );
  16. EFI_DRIVER_ENTRY_POINT(InitializeInternalTestCommand)
  17. EFI_STATUS
  18. InitializeInternalTestCommand (
  19. IN EFI_HANDLE ImageHandle,
  20. IN EFI_SYSTEM_TABLE *SystemTable
  21. )
  22. {
  23. CHAR16 **Argv;
  24. UINTN Argc;
  25. UINTN i;
  26. /*
  27. * Check to see if the app is to be installed as a "internal command"
  28. * to the shell
  29. */
  30. InstallInternalShellCommand (
  31. ImageHandle, SystemTable, InitializeInternalTestCommand,
  32. L"itestcmd", /* command */
  33. L"itestcmd", /* command syntax */
  34. L"Displays argc/argv list", /* 1 line descriptor */
  35. NULL /* command help page */
  36. );
  37. /*
  38. * We are not being installed as an internal command driver, initialize
  39. * as an nshell app and run
  40. */
  41. InitializeShellApplication (ImageHandle, SystemTable);
  42. /*
  43. * Get Argc and Argv.
  44. */
  45. Argv = SI->Argv;
  46. Argc = SI->Argc;
  47. /*
  48. * Display list of argumnents.
  49. */
  50. for(i=0;i<Argc;i++) {
  51. Print(L"Argv[%d] = %s\n",i,Argv[i]);
  52. }
  53. return EFI_SUCCESS;
  54. }