Print this page
4420 flowstat usage message is incorrect
4420 flowstat usage message is incorrect

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/flowstat/flowstat.c
          +++ new/usr/src/cmd/flowstat/flowstat.c
↓ open down ↓ 181 lines elided ↑ open up ↑
 182  182  ;
 183  183  
 184  184  static char *progname;
 185  185  
 186  186  /*
 187  187   * Handle to libdladm.  Opened in main() before the sub-command
 188  188   * specific function is called.
 189  189   */
 190  190  static dladm_handle_t handle = NULL;
 191  191  
 192      -const char *usage_ermsg = "flowstat [-r | -t] [-i interval] "
      192 +const char *usage_ermsg = "usage: flowstat [-r | -t] [-i interval] "
 193  193              "[-l link] [flow]\n"
 194      -            "       flowstat [-S] [-A] [-i interval] [-p] [ -o field[,...]]\n"
 195      -            "                [-u R|K|M|G|T|P] [-l link] [flow]\n"
 196      -            "       flowstat -h [-a] [-d] [-F format]"
 197      -            " [-s <DD/MM/YYYY,HH:MM:SS>]\n"
 198      -            "                [-e <DD/MM/YYYY,HH:MM:SS>] -f <logfile> "
 199      -            "[<flow>]";
      194 +            "       flowstat [-p | -u R|K|M|G|T|P] [ -o field[,...]] "
      195 +            "[-l link] [flow]\n"
      196 +            "       flowstat [-A] [-l link] [flow]\n"
      197 +            "       flowstat [-S] [-i interval] [-l link] [flow]\n"
      198 +            "       flowstat -h [-a] [-d] [-F format] "
      199 +            "[-s <DD/MM/YYYY,HH:MM:SS>]\n"
      200 +            "                [-e <DD/MM/YYYY,HH:MM:SS>] -f <logfile> [<flow>]";
 200  201  
 201  202  static void
 202  203  usage(void)
 203  204  {
 204  205          (void) fprintf(stderr, "%s\n", gettext(usage_ermsg));
 205  206  
 206  207          /* close dladm handle if it was opened */
 207  208          if (handle != NULL)
 208  209                  dladm_close(handle);
 209  210  
↓ open down ↓ 860 lines elided ↑ open up ↑
1070 1071  die_optdup(int opt)
1071 1072  {
1072 1073          die("the option -%c cannot be specified more than once", opt);
1073 1074  }
1074 1075  
1075 1076  static void
1076 1077  die_opterr(int opt, int opterr, const char *usage)
1077 1078  {
1078 1079          switch (opterr) {
1079 1080          case ':':
1080      -                die("option '-%c' requires a value\nusage: %s", opt,
     1081 +                die("option '-%c' requires a value\n%s", opt,
1081 1082                      gettext(usage));
1082 1083                  break;
1083 1084          case '?':
1084 1085          default:
1085      -                die("unrecognized option '-%c'\nusage: %s", opt,
     1086 +                die("unrecognized option '-%c'\n%s", opt,
1086 1087                      gettext(usage));
1087 1088                  break;
1088 1089          }
1089 1090  }
1090 1091  
1091 1092  /* PRINTFLIKE2 */
1092 1093  static void
1093 1094  die_dlerr(dladm_status_t err, const char *format, ...)
1094 1095  {
1095 1096          va_list alist;
↓ open down ↓ 54 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX