posix-uefi/examples/02_args/args.c

16 lines
336 B
C
Raw Normal View History

2021-02-01 01:09:23 +01:00
#include <uefi.h>
2021-02-02 01:26:30 +01:00
/**
2021-11-28 18:19:09 +01:00
* Print out arguments. This source can be compiled with and without UEFI_NO_UTF8
2021-02-02 01:26:30 +01:00
*/
2021-02-16 13:47:43 +01:00
int main(int argc, char_t **argv)
2021-02-01 01:09:23 +01:00
{
int i;
2021-02-02 01:26:30 +01:00
2021-02-16 13:47:43 +01:00
printf(CL("I got %d argument%s:\n"), argc, argc > 1 ? CL("s") : CL(""));
2021-02-02 01:26:30 +01:00
for(i = 0; i < argc; i++)
2021-02-16 13:47:43 +01:00
printf(CL(" argv[%d] = '%s'\n"), i, argv[i]);
2021-02-02 01:26:30 +01:00
2021-02-01 01:09:23 +01:00
return 0;
}