X-Git-Url: https://git.tokkee.org/?p=libjunos.git;a=blobdiff_plain;f=src%2Fjunosc.c;fp=src%2Fjunosc.c;h=4b1bb6bfe1b17657a7ef42bcb8ace87931a99f4e;hp=e08cc7788fb631edbac7aae7ddf334d977697f06;hb=1564b261c7e0f4141a2ff8b0f9456758653d7458;hpb=b65cb1ca497d4f048def2e5a46fa64ad5007149e diff --git a/src/junosc.c b/src/junosc.c index e08cc77..4b1bb6b 100644 --- a/src/junosc.c +++ b/src/junosc.c @@ -51,7 +51,7 @@ static void exit_usage(char *name, int status) { printf( -"Usage: %s -H [] \n" +"Usage: %s -H [] \n" "\nOptions:\n" " -H hostname to connect to\n" @@ -92,7 +92,7 @@ main(int argc, char **argv) char *username = NULL; char *password = NULL; - char *command = NULL; + char *method = NULL; junos_t *junos; xmlDocPtr doc; @@ -134,11 +134,11 @@ main(int argc, char **argv) } if (optind != argc - 1) { - fprintf(stderr, "Missing command name\n"); + fprintf(stderr, "Missing method name\n"); exit_usage(argv[0], 1); } - command = argv[optind]; + method = argv[optind]; ++optind; if (use_netrc @@ -187,13 +187,13 @@ main(int argc, char **argv) } junos_clear_error(junos); - doc = junos_simple_command(junos, command); + doc = junos_simple_method(junos, method); if (doc) { xmlDocFormatDump(stderr, doc, /* format = */ 1); xmlFreeDoc(doc); } else { - fprintf(stderr, "Command failed: %s\n", junos_get_errstr(junos)); + fprintf(stderr, "Method failed: %s\n", junos_get_errstr(junos)); } junos_disconnect(junos);