Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-5935 lnet: Fixes to make lnetctl function as expected.
[fs/lustre-release.git]
/
lnet
/
utils
/
lnetctl.c
diff --git
a/lnet/utils/lnetctl.c
b/lnet/utils/lnetctl.c
index
6f3b232
..
43ed605
100644
(file)
--- a/
lnet/utils/lnetctl.c
+++ b/
lnet/utils/lnetctl.c
@@
-299,7
+299,6
@@
static int jt_config_lnet(int argc, char **argv)
struct cYAML *err_rc = NULL;
bool load_mod_params = false;
int rc, opt;
struct cYAML *err_rc = NULL;
bool load_mod_params = false;
int rc, opt;
- optind = 0;
const char *const short_options = "ah";
const struct option long_options[] = {
const char *const short_options = "ah";
const struct option long_options[] = {
@@
-337,7
+336,6
@@
static int jt_unconfig_lnet(int argc, char **argv)
{
struct cYAML *err_rc = NULL;
int rc;
{
struct cYAML *err_rc = NULL;
int rc;
- optind = 0;
if (handle_help(lnet_cmds, "lnet", "unconfigure", argc, argv) == 0)
return 0;
if (handle_help(lnet_cmds, "lnet", "unconfigure", argc, argv) == 0)
return 0;
@@
-357,7
+355,6
@@
static int jt_add_route(int argc, char **argv)
long int hop = -1, prio = -1;
struct cYAML *err_rc = NULL;
int rc, opt;
long int hop = -1, prio = -1;
struct cYAML *err_rc = NULL;
int rc, opt;
- optind = 0;
const char *const short_options = "n:g:c:p:h";
const struct option long_options[] = {
const char *const short_options = "n:g:c:p:h";
const struct option long_options[] = {
@@
-418,7
+415,6
@@
static int jt_add_net(int argc, char **argv)
long int pto = -1, pc = -1, pbc = -1, cre = -1;
struct cYAML *err_rc = NULL;
int rc, opt;
long int pto = -1, pc = -1, pbc = -1, cre = -1;
struct cYAML *err_rc = NULL;
int rc, opt;
- optind = 0;
const char *const short_options = "n:i:p:t:c:b:r:s:h";
const struct option long_options[] = {
const char *const short_options = "n:i:p:t:c:b:r:s:h";
const struct option long_options[] = {
@@
-505,7
+501,6
@@
static int jt_del_route(int argc, char **argv)
char *network = NULL, *gateway = NULL;
struct cYAML *err_rc = NULL;
int rc, opt;
char *network = NULL, *gateway = NULL;
struct cYAML *err_rc = NULL;
int rc, opt;
- optind = 0;
const char *const short_options = "n:g:h";
const struct option long_options[] = {
const char *const short_options = "n:g:h";
const struct option long_options[] = {
@@
-547,7
+542,6
@@
static int jt_del_net(int argc, char **argv)
char *network = NULL;
struct cYAML *err_rc = NULL;
int rc, opt;
char *network = NULL;
struct cYAML *err_rc = NULL;
int rc, opt;
- optind = 0;
const char *const short_options = "n:h";
const struct option long_options[] = {
const char *const short_options = "n:h";
const struct option long_options[] = {
@@
-586,7
+580,6
@@
static int jt_show_route(int argc, char **argv)
long int hop = -1, prio = -1;
int detail = 0, rc, opt;
struct cYAML *err_rc = NULL, *show_rc = NULL;
long int hop = -1, prio = -1;
int detail = 0, rc, opt;
struct cYAML *err_rc = NULL, *show_rc = NULL;
- optind = 0;
const char *const short_options = "n:g:h:p:vh";
const struct option long_options[] = {
const char *const short_options = "n:g:h:p:vh";
const struct option long_options[] = {
@@
-654,7
+647,6
@@
static int jt_show_net(int argc, char **argv)
char *network = NULL;
int detail = 0, rc, opt;
struct cYAML *err_rc = NULL, *show_rc = NULL;
char *network = NULL;
int detail = 0, rc, opt;
struct cYAML *err_rc = NULL, *show_rc = NULL;
- optind = 0;
const char *const short_options = "n:vh";
const struct option long_options[] = {
const char *const short_options = "n:vh";
const struct option long_options[] = {
@@
-740,7
+732,6
@@
static int jt_show_peer_credits(int argc, char **argv)
{
int rc;
struct cYAML *show_rc = NULL, *err_rc = NULL;
{
int rc;
struct cYAML *show_rc = NULL, *err_rc = NULL;
- optind = 0;
if (handle_help(credits_cmds, "peer_credits", "show", argc, argv) == 0)
return 0;
if (handle_help(credits_cmds, "peer_credits", "show", argc, argv) == 0)
return 0;
@@
-848,7
+839,6
@@
static int jt_import(int argc, char **argv)
struct cYAML *err_rc = NULL;
struct cYAML *show_rc = NULL;
int rc = 0, opt, opt_found = 0;
struct cYAML *err_rc = NULL;
struct cYAML *show_rc = NULL;
int rc = 0, opt, opt_found = 0;
- optind = 0;
char cmd = 'a';
const char *const short_options = "adsh";
char cmd = 'a';
const char *const short_options = "adsh";
@@
-918,7
+908,6
@@
static int jt_export(int argc, char **argv)
struct cYAML *err_rc = NULL;
int rc, opt;
FILE *f = NULL;
struct cYAML *err_rc = NULL;
int rc, opt;
FILE *f = NULL;
- optind = 0;
const char *const short_options = "h";
const struct option long_options[] = {
const char *const short_options = "h";
const struct option long_options[] = {
@@
-987,7
+976,7
@@
command_t list[] = {
"--help} FILE.yaml"},
{"export", jt_export, 0, "export {--help} FILE.yaml"},
{"stats", jt_stats, 0, "stats {show | help}"},
"--help} FILE.yaml"},
{"export", jt_export, 0, "export {--help} FILE.yaml"},
{"stats", jt_stats, 0, "stats {show | help}"},
- {"peer_credits", jt_peer_credits, 0, "
sta
ts {show | help}"},
+ {"peer_credits", jt_peer_credits, 0, "
peer_credi
ts {show | help}"},
{"help", Parser_help, 0, "help"},
{"exit", Parser_quit, 0, "quit"},
{"quit", Parser_quit, 0, "quit"},
{"help", Parser_help, 0, "help"},
{"exit", Parser_quit, 0, "quit"},
{"quit", Parser_quit, 0, "quit"},