Skip to content

Commit 822ab7a

Browse files
committed
added main driver to test and debug library.
1 parent 65bbb58 commit 822ab7a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

nvram_faker_main.c

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* test driver to debug nvram-faker code without
3+
* having to LD_PRELOAD a lib.
4+
*/
5+
#include <stdio.h>
6+
#include <stdlib.h>
7+
8+
#ifndef DEBUG
9+
#define DEBUG
10+
#endif
11+
12+
#ifndef NVRAM_EXE
13+
#define NVRAM_EXE
14+
#endif
15+
16+
//#ifndef INI_FILE_PATH
17+
#define INI_FILE_PATH "./nvram.ini"
18+
//#endif
19+
20+
#include "nvram-faker-internal.h"
21+
22+
extern void initialize_ini(void);
23+
extern void end(void);
24+
25+
int main(void)
26+
{
27+
DEBUG_PRINTF("calling initalize_ini().\n");
28+
initialize_ini();
29+
DEBUG_PRINTF("calling end().\n");
30+
end();
31+
DEBUG_PRINTF("Done.\n");
32+
return 0;
33+
}

0 commit comments

Comments
 (0)