diff options
| author | Yuri Pankov <yuri.pankov@nexenta.com> | 2015-12-01 17:37:33 +0300 |
|---|---|---|
| committer | Hans Rosenfeld <hans.rosenfeld@nexenta.com> | 2015-12-05 00:12:46 +0100 |
| commit | 62ef8476c4f1cb016de161827d921418dee4b031 (patch) | |
| tree | a7c97261e224775bb15f92ac668d1c83f1101de6 /usr/src/cmd/dladm | |
| parent | e8ea23086f5fd6f2b2f60c03b98d019041a374a2 (diff) | |
| download | illumos-joyent-62ef8476c4f1cb016de161827d921418dee4b031.tar.gz | |
4008 libdladm should not have a curses UI inside
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Diffstat (limited to 'usr/src/cmd/dladm')
| -rw-r--r-- | usr/src/cmd/dladm/dladm.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/usr/src/cmd/dladm/dladm.c b/usr/src/cmd/dladm/dladm.c index 904eca536d..8277d60ac2 100644 --- a/usr/src/cmd/dladm/dladm.c +++ b/usr/src/cmd/dladm/dladm.c @@ -3389,7 +3389,6 @@ do_show_link(int argc, char *argv[], const char *use) { int option; boolean_t s_arg = B_FALSE; - boolean_t S_arg = B_FALSE; boolean_t i_arg = B_FALSE; uint32_t flags = DLADM_OPT_ACTIVE; boolean_t p_arg = B_FALSE; @@ -3411,7 +3410,7 @@ do_show_link(int argc, char *argv[], const char *use) bzero(&state, sizeof (state)); opterr = 0; - while ((option = getopt_long(argc, argv, ":pPsSi:o:", + while ((option = getopt_long(argc, argv, ":pPsi:o:", show_lopts, NULL)) != -1) { switch (option) { case 'p': @@ -3432,12 +3431,6 @@ do_show_link(int argc, char *argv[], const char *use) flags = DLADM_OPT_PERSIST; break; - case 'S': - if (S_arg) - die_optdup(option); - - S_arg = B_TRUE; - break; case 'o': o_arg = B_TRUE; fields_str = optarg; @@ -3456,18 +3449,12 @@ do_show_link(int argc, char *argv[], const char *use) } } - if (i_arg && !(s_arg || S_arg)) - die("the option -i can be used only with -s or -S"); - - if (s_arg && S_arg) - die("the -s option cannot be used with -S"); + if (i_arg && !s_arg) + die("the option -i can be used only with -s"); if (s_arg && flags != DLADM_OPT_ACTIVE) die("the option -P cannot be used with -s"); - if (S_arg && (p_arg || flags != DLADM_OPT_ACTIVE)) - die("the option -%c cannot be used with -S", p_arg ? 'p' : 'P'); - /* get link name (optional last argument) */ if (optind == (argc-1)) { uint32_t f; @@ -3492,11 +3479,6 @@ do_show_link(int argc, char *argv[], const char *use) if (p_arg && !o_arg) die("-p requires -o"); - if (S_arg) { - dladm_continuous(handle, linkid, NULL, interval, LINK_REPORT); - return; - } - if (p_arg && strcasecmp(fields_str, "all") == 0) die("\"-o all\" is invalid with -p"); |
