* Author:
* Amir Shehata <amir.shehata@intel.com>
*/
-
+#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
-#include <getopt.h>
+#include <string.h>
+#include <libcfs/util/parser.h>
#include <lnet/lnetctl.h>
-#include <libcfs/libcfsutil.h>
#include "cyaml/cyaml.h"
#include "lnetconfig/liblnetconfig.h"
"--help} FILE.yaml"},
{"export", jt_export, 0, "export {--help} FILE.yaml"},
{"stats", jt_stats, 0, "stats {show | help}"},
- {"peer_credits", jt_peer_credits, 0, "stats {show | help}"},
+ {"peer_credits", jt_peer_credits, 0, "peer_credits {show | help}"},
{"help", Parser_help, 0, "help"},
{"exit", Parser_quit, 0, "quit"},
{"quit", Parser_quit, 0, "quit"},
return rc;
}
- rc = libcfs_arch_init();
- if (rc < 0) {
- cYAML_build_error(-1, -1, "lnetctl", "startup",
- "cannot initialize libcfs", &err_rc);
- cYAML_print_tree2file(stderr, err_rc);
- return rc;
- }
-
Parser_init("lnetctl > ", list);
if (argc > 1) {
rc = Parser_execarg(argc - 1, &argv[1], list);
Parser_commands();
errorout:
- libcfs_arch_cleanup();
return rc;
}