datapath: Don't call genlmsg_reply() under rcu_read_lock().
[openvswitch] / vswitchd / ovs-brcompatd.c
index 32345296fe89daaa54f1f1c061af6946b84f8985..973b098b2f1e43303964d28f146e5be0f18f9450 100644 (file)
@@ -1289,7 +1289,6 @@ main(int argc, char *argv[])
     process_init();
     ovsrec_init();
 
-    die_if_already_running();
     daemonize_start();
 
     retval = unixctl_server_create(NULL, &unixctl);
@@ -1298,8 +1297,8 @@ main(int argc, char *argv[])
     }
 
     if (brc_open(&brc_sock)) {
-        ovs_fatal(0, "could not open brcompat socket.  Check "
-                "\"brcompat\" kernel module.");
+        VLOG_FATAL("could not open brcompat socket.  Check "
+                   "\"brcompat\" kernel module.");
     }
 
     if (prune_timeout) {
@@ -1307,12 +1306,14 @@ main(int argc, char *argv[])
 
         error = nl_sock_create(NETLINK_ROUTE, &rtnl_sock);
         if (error) {
-            ovs_fatal(error, "could not create rtnetlink socket");
+            VLOG_FATAL("could not create rtnetlink socket (%s)",
+                       strerror(error));
         }
 
         error = nl_sock_join_mcgroup(rtnl_sock, RTNLGRP_LINK);
         if (error) {
-            ovs_fatal(error, "could not join RTNLGRP_LINK multicast group");
+            VLOG_FATAL("could not join RTNLGRP_LINK multicast group (%s)",
+                       strerror(error));
         }
     }
 
@@ -1378,11 +1379,11 @@ validate_appctl_command(void)
         } else if (p[1] == 's') {
             n++;
         } else {
-            ovs_fatal(0, "only '%%s' and '%%%%' allowed in --appctl-command");
+            VLOG_FATAL("only '%%s' and '%%%%' allowed in --appctl-command");
         }
     }
     if (n != 1) {
-        ovs_fatal(0, "'%%s' must appear exactly once in --appctl-command");
+        VLOG_FATAL("'%%s' must appear exactly once in --appctl-command");
     }
 }
 
@@ -1397,14 +1398,14 @@ parse_options(int argc, char *argv[])
         DAEMON_OPTION_ENUMS
     };
     static struct option long_options[] = {
-        {"help",             no_argument, 0, 'h'},
-        {"version",          no_argument, 0, 'V'},
-        {"prune-timeout",    required_argument, 0, OPT_PRUNE_TIMEOUT},
-        {"appctl-command",   required_argument, 0, OPT_APPCTL_COMMAND},
+        {"help",             no_argument, NULL, 'h'},
+        {"version",          no_argument, NULL, 'V'},
+        {"prune-timeout",    required_argument, NULL, OPT_PRUNE_TIMEOUT},
+        {"appctl-command",   required_argument, NULL, OPT_APPCTL_COMMAND},
         DAEMON_LONG_OPTIONS,
         VLOG_LONG_OPTIONS,
         LEAK_CHECKER_LONG_OPTIONS,
-        {0, 0, 0, 0},
+        {NULL, 0, NULL, 0},
     };
     char *short_options = long_options_to_short_options(long_options);
 
@@ -1453,8 +1454,8 @@ parse_options(int argc, char *argv[])
     argv += optind;
 
     if (argc != 1) {
-        ovs_fatal(0, "database socket is non-option argument; "
-                "use --help for usage");
+        VLOG_FATAL("database socket is non-option argument; "
+                   "use --help for usage");
     }
 
     return argv[0];