![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/n_top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
![[help]](../icons/help.png) */
 */
   1 /* 
   2  * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
   3  * 
   4  * This program is free software; you can redistribute it and/or
   5  * modify it under the terms of the GNU General Public
   6  * License as published by the Free Software Foundation; either
   7  * version 2 of the License, or (at your option) any later version.
   8  * 
   9  * This software is distributed in the hope that it will be useful,
  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12  * General Public License for more details.
  13  * 
  14  * You should have received a copy of the GNU General Public
  15  * License along with this library; if not, write to the Free Software
  16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  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)
     /* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
![[help]](../icons/help.png) */
  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 }
 */
  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 }
![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/n_bottom.png)
![[index]](../icons/index.png)
![[help]](../icons/help.png) */
 */