~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to tests/test-netflow.c

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2011, 2012 Nicira, Inc.
 
2
 * Copyright (c) 2011, 2012, 2013 Nicira, Inc.
3
3
 *
4
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
5
 * you may not use this file except in compliance with the License.
184
184
 
185
185
    sock = inet_open_passive(SOCK_DGRAM, target, 0, NULL, 0);
186
186
    if (sock < 0) {
187
 
        ovs_fatal(0, "%s: failed to open (%s)", argv[1], strerror(-sock));
 
187
        ovs_fatal(0, "%s: failed to open (%s)", argv[1], ovs_strerror(-sock));
188
188
    }
189
189
 
190
190
    daemon_save_fd(STDOUT_FILENO);
234
234
parse_options(int argc, char *argv[])
235
235
{
236
236
    enum {
237
 
        DAEMON_OPTION_ENUMS
 
237
        DAEMON_OPTION_ENUMS,
 
238
        VLOG_OPTION_ENUMS
238
239
    };
239
 
    static struct option long_options[] = {
240
 
        {"verbose", optional_argument, NULL, 'v'},
 
240
    static const struct option long_options[] = {
241
241
        {"help", no_argument, NULL, 'h'},
242
242
        DAEMON_LONG_OPTIONS,
 
243
        VLOG_LONG_OPTIONS,
243
244
        {NULL, 0, NULL, 0},
244
245
    };
245
246
    char *short_options = long_options_to_short_options(long_options);
254
255
        case 'h':
255
256
            usage();
256
257
 
257
 
        case 'v':
258
 
            vlog_set_verbosity(optarg);
259
 
            break;
260
 
 
261
258
        DAEMON_OPTION_HANDLERS
 
259
        VLOG_OPTION_HANDLERS
262
260
 
263
261
        case '?':
264
262
            exit(EXIT_FAILURE);