chiark / gitweb /
bus: always create --user bus when kdbus is active
[elogind.git] / src / network / networkd-bridge.c
index 2c541463ec9d3a4890fab36e4ebf79b56beeb2b3..ac71cf39d89a2039cf9999b024981d2def4ec724 100644 (file)
@@ -112,7 +112,7 @@ static int bridge_enter_ready(Bridge *bridge) {
 
         bridge->state = BRIDGE_STATE_READY;
 
-        log_info("Bridge '%s' ready", bridge->name);
+        log_info("%s: bridge ready", bridge->name);
 
         LIST_FOREACH(callbacks, callback, bridge->callbacks) {
                 /* join the links that were attempted to be joined befor the
@@ -131,7 +131,7 @@ static int bridge_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
 
         r = sd_rtnl_message_get_errno(m);
         if (r < 0) {
-                log_warning("Bridge '%s' failed: %s", bridge->name, strerror(-r));
+                log_warning("%s: bridge failed: %s", bridge->name, strerror(-r));
                 bridge_enter_failed(bridge);
 
                 return 1;
@@ -139,8 +139,8 @@ static int bridge_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
 
         if (bridge->link)
                 bridge_enter_ready(bridge);
-
-        bridge->state = BRIDGE_STATE_CREATED;
+        else
+                bridge->state = BRIDGE_STATE_CREATED;
 
         return 1;
 }
@@ -196,7 +196,7 @@ static int bridge_create(Bridge *bridge) {
                 return r;
         }
 
-        log_info("Creating bridge '%s'", bridge->name);
+        log_debug("%s: creating bridge", bridge->name);
 
         bridge->state = BRIDGE_STATE_CREATING;
 
@@ -246,6 +246,9 @@ static int bridge_load_one(Manager *manager, const char *filename) {
         _cleanup_fclose_ FILE *file = NULL;
         int r;
 
+        assert(manager);
+        assert(filename);
+
         file = fopen(filename, "re");
         if (!file) {
                 if (errno == ENOENT)
@@ -266,8 +269,7 @@ static int bridge_load_one(Manager *manager, const char *filename) {
         if (r < 0) {
                 log_warning("Could not parse config file %s: %s", filename, strerror(-r));
                 return r;
-        } else
-                log_debug("Parsed configuration file %s", filename);
+        }
 
         if (!bridge->name) {
                 log_warning("Bridge without Name configured in %s. Ignoring", filename);