@@ -53,9 +53,9 @@ cmd_print_help(void)
5353void
5454cmd_data_help (void )
5555{
56- printf ("data [-(-s)trict] [-x OPTION ] [-d DEFAULTS] [-o <output-file>] [-f (xml | json)] [-t <additional-tree-file-name>]\n" );
56+ printf ("data [-(-s)trict] [-t TYPE ] [-d DEFAULTS] [-o <output-file>] [-f (xml | json)] [-x <additional-tree-file-name>]\n" );
5757 printf (" <data-file-name> [<JSON-rpc/action-schema-nodeid>]\n" );
58- printf ("Accepted OPTIONs :\n" );
58+ printf ("Accepted TYPEs :\n" );
5959 printf ("\tauto - resolve data type (one of the following) automatically (as pyang does),\n" );
6060 printf ("\t this option is applicable only in case of XML input data.\n" );
6161 printf ("\tconfig - LYD_OPT_CONFIG\n" );
@@ -70,18 +70,18 @@ cmd_data_help(void)
7070 printf ("\tall-tagged - add missing default nodes and mark all the default nodes with the attribute.\n" );
7171 printf ("\ttrim - remove all nodes with a default value\n" );
7272 printf ("\timplicit-tagged - add missing nodes and mark them with the attribute\n\n" );
73- printf ("Option -t :\n" );
74- printf ("\tIf RPC/action/notification/RPC reply (for OPTIONs 'rpc', 'rpcreply', and 'notif') includes\n" );
73+ printf ("Option -x :\n" );
74+ printf ("\tIf RPC/action/notification/RPC reply (for TYPEs 'rpc', 'rpcreply', and 'notif') includes\n" );
7575 printf ("\tan XPath expression (when/must) that needs access to the configuration data, you can provide\n" );
7676 printf ("\tthem in a file, which will be parsed as 'config'.\n" );
7777}
7878
7979void
8080cmd_xpath_help (void )
8181{
82- printf ("xpath [-x OPTION ] [-t <additional-tree-file-name>] -e <XPath-expression>\n"
82+ printf ("xpath [-t TYPE ] [-x <additional-tree-file-name>] -e <XPath-expression>\n"
8383 " <XML-data-file-name> [<JSON-rpc/action-schema-nodeid>]\n" );
84- printf ("Accepted OPTIONs :\n" );
84+ printf ("Accepted TYPEs :\n" );
8585 printf ("\tauto - resolve data type (one of the following) automatically (as pyang does),\n" );
8686 printf ("\t this option is applicable only in case of XML input data.\n" );
8787 printf ("\tconfig - LYD_OPT_CONFIG\n" );
@@ -91,8 +91,8 @@ cmd_xpath_help(void)
9191 printf ("\trpc - LYD_OPT_RPC\n" );
9292 printf ("\trpcreply - LYD_OPT_RPCREPLY (last parameter mandatory in this case)\n" );
9393 printf ("\tnotif - LYD_OPT_NOTIF\n\n" );
94- printf ("Option -t :\n" );
95- printf ("\tIf RPC/action/notification/RPC reply (for OPTIONs 'rpc', 'rpcreply', and 'notif') includes\n" );
94+ printf ("Option -x :\n" );
95+ printf ("\tIf RPC/action/notification/RPC reply (for TYPEs 'rpc', 'rpcreply', and 'notif') includes\n" );
9696 printf ("\tan XPath expression (when/must) that needs access to the configuration data, you can provide\n" );
9797 printf ("\tthem in a file, which will be parsed as 'config'.\n" );
9898}
@@ -495,10 +495,10 @@ cmd_data(const char *arg)
495495 {"defaults" , required_argument , 0 , 'd' },
496496 {"help" , no_argument , 0 , 'h' },
497497 {"format" , required_argument , 0 , 'f' },
498- {"option" , required_argument , 0 , 'x ' },
498+ {"option" , required_argument , 0 , 't ' },
499499 {"output" , required_argument , 0 , 'o' },
500500 {"strict" , no_argument , 0 , 's' },
501- {"validation-tree" , required_argument , 0 , 't ' },
501+ {"validation-tree" , required_argument , 0 , 'x ' },
502502 {NULL , 0 , 0 , 0 }
503503 };
504504
@@ -515,7 +515,7 @@ cmd_data(const char *arg)
515515 optind = 0 ;
516516 while (1 ) {
517517 option_index = 0 ;
518- c = getopt_long (argc , argv , "d:hf:o:sx:t :" , long_options , & option_index );
518+ c = getopt_long (argc , argv , "d:hf:o:st:x :" , long_options , & option_index );
519519 if (c == -1 ) {
520520 break ;
521521 }
@@ -557,7 +557,7 @@ cmd_data(const char *arg)
557557 options |= LYD_OPT_STRICT ;
558558 options |= LYD_OPT_OBSOLETE ;
559559 break ;
560- case 'x ' :
560+ case 't ' :
561561 if (!strcmp (optarg , "auto" )) {
562562 options = (options & ~LYD_OPT_TYPEMASK ) | LYD_OPT_TYPEMASK ;
563563 } else if (!strcmp (optarg , "config" )) {
@@ -580,7 +580,7 @@ cmd_data(const char *arg)
580580 goto cleanup ;
581581 }
582582 break ;
583- case 't ' :
583+ case 'x ' :
584584 val_tree = lyd_parse_path (ctx , optarg , LYD_XML , LYD_OPT_CONFIG );
585585 if (!val_tree ) {
586586 fprintf (stderr , "Failed to parse the additional data tree for validation.\n" );
@@ -699,7 +699,7 @@ cmd_xpath(const char *arg)
699699 case 'e' :
700700 expr = optarg ;
701701 break ;
702- case 'x ' :
702+ case 't ' :
703703 if (!strcmp (optarg , "auto" )) {
704704 options = (options & ~LYD_OPT_TYPEMASK ) | LYD_OPT_TYPEMASK ;
705705 } else if (!strcmp (optarg , "config" )) {
@@ -722,7 +722,7 @@ cmd_xpath(const char *arg)
722722 goto cleanup ;
723723 }
724724 break ;
725- case 't ' :
725+ case 'x ' :
726726 val_tree = lyd_parse_path (ctx , optarg , LYD_XML , LYD_OPT_CONFIG );
727727 if (!val_tree ) {
728728 fprintf (stderr , "Failed to parse the additional data tree for validation.\n" );
0 commit comments