~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to utilities/ovs-appctl.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "timeval.h"
32
32
#include "unixctl.h"
33
33
#include "util.h"
34
 
#include "vlog.h"
 
34
#include "openvswitch/vlog.h"
35
35
 
36
36
static void usage(void);
37
37
static const char *parse_command_line(int argc, char *argv[]);
89
89
Targets:\n\
90
90
  -t, --target=TARGET  pidfile or socket to contact\n\
91
91
Common commands:\n\
92
 
  help               List commands supported by the target\n\
 
92
  list-commands      List commands supported by the target\n\
93
93
  version            Print version of the target\n\
94
94
  vlog/list          List current logging levels\n\
 
95
  vlog/list-pattern  List logging patterns for each destination.\n\
95
96
  vlog/set [SPEC]\n\
96
97
      Set log levels as detailed in SPEC, which may include:\n\
97
98
      A valid module name (all modules, by default)\n\
98
 
      'syslog', 'console', 'file' (all facilities, by default))\n\
 
99
      'syslog', 'console', 'file' (all destinations, by default))\n\
99
100
      'off', 'emer', 'err', 'warn', 'info', or 'dbg' ('dbg', bydefault)\n\
100
101
  vlog/reopen        Make the program reopen its log file\n\
101
102
Other options:\n\
110
111
parse_command_line(int argc, char *argv[])
111
112
{
112
113
    enum {
 
114
        OPT_START = UCHAR_MAX + 1,
113
115
        VLOG_OPTION_ENUMS
114
116
    };
115
117
    static const struct option long_options[] = {
116
118
        {"target", required_argument, NULL, 't'},
117
119
        {"execute", no_argument, NULL, 'e'},
118
120
        {"help", no_argument, NULL, 'h'},
 
121
        {"option", no_argument, NULL, 'o'},
119
122
        {"version", no_argument, NULL, 'V'},
120
123
        {"timeout", required_argument, NULL, 'T'},
121
124
        VLOG_LONG_OPTIONS,
122
125
        {NULL, 0, NULL, 0},
123
126
    };
124
 
    char *short_options_ = long_options_to_short_options(long_options);
 
127
    char *short_options_ = ovs_cmdl_long_options_to_short_options(long_options);
125
128
    char *short_options = xasprintf("+%s", short_options_);
126
129
    const char *target;
127
130
    int e_options;
157
160
            usage();
158
161
            break;
159
162
 
 
163
        case 'o':
 
164
            ovs_cmdl_print_options(long_options);
 
165
            exit(EXIT_SUCCESS);
 
166
 
160
167
        case 'T':
161
168
            time_alarm(atoi(optarg));
162
169
            break;