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