/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "timeval.h"
#include "unixctl.h"
#include "util.h"
-#include "vconn.h"
-#include "vlog.h"
+#include "openvswitch/vconn.h"
+#include "openvswitch/vlog.h"
#include "socket-util.h"
#include "ofp-util.h"
static void new_switch(struct switch_ *, struct vconn *);
static void parse_options(int argc, char *argv[]);
-NO_RETURN static void usage(void);
+OVS_NO_RETURN static void usage(void);
int
main(int argc, char *argv[])
int retval;
int i;
- proctitle_init(argc, argv);
+ ovs_cmdl_proctitle_init(argc, argv);
set_program_name(argv[0]);
parse_options(argc, argv);
fatal_ignore_sigpipe();
+ daemon_become_new_user(false);
+
if (argc - optind < 1) {
ovs_fatal(0, "at least one vconn argument required; "
"use --help for usage");
ovs_fatal(0, "no active or passive switch connections");
}
- daemonize_start();
+ daemonize_start(false);
retval = unixctl_server_create(unixctl_path, &unixctl);
if (retval) {
{"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
{NULL, 0, NULL, 0},
};
- char *short_options = long_options_to_short_options(long_options);
+ char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
for (;;) {
int indexptr;