This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <sys/param.h>
13 #include <stdio.h>
14 #include <sys/types.h>
15 #include <sys/stat.h>
16 #include <unistd.h>
17
18 #include <stdlib.h>
19 #include <errno.h>
20 #include <fcntl.h>
21
22 #include <crm/crm.h>
23 #include <crm/cib.h>
24
25 #define OPTARGS "X:"
26
27 int
28 main(int argc, char **argv)
29 {
30 int flag;
31 xmlNode *top = NULL;
32 const char *xml_file = NULL;
33
34 crm_log_init(NULL, LOG_TRACE, FALSE, TRUE, argc, argv, FALSE);
35 while (1) {
36 flag = getopt(argc, argv, OPTARGS);
37 if (flag == -1)
38 break;
39
40 switch (flag) {
41 case 'X':
42 xml_file = optarg;
43 break;
44 default:
45 printf("Unknown option: -%c\n", flag);
46 break;
47 }
48 }
49
50 top = filename2xml(xml_file);
51 free_xml(top);
52 return 0;
53 }