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
20
21 #include <crm_internal.h>
22
23 #include <sys/param.h>
24 #include <stdio.h>
25 #include <sys/types.h>
26 #include <sys/stat.h>
27 #include <unistd.h>
28
29 #include <stdlib.h>
30 #include <errno.h>
31 #include <fcntl.h>
32
33 #include <crm/crm.h>
34 #include <crm/cib.h>
35
36 #define OPTARGS "X:"
37
38 int
39 main(int argc, char **argv)
40 {
41 int flag;
42 xmlNode *top = NULL;
43 const char *xml_file = NULL;
44
45 crm_log_init(NULL, LOG_TRACE, FALSE, TRUE, argc, argv, FALSE);
46 while (1) {
47 flag = getopt(argc, argv, OPTARGS);
48 if (flag == -1)
49 break;
50
51 switch (flag) {
52 case 'X':
53 xml_file = optarg;
54 break;
55 default:
56 printf("Unknown option: -%c\n", flag);
57 break;
58 }
59 }
60
61 top = filename2xml(xml_file);
62 free_xml(top);
63 return 0;
64 }