chiark / gitweb /
remove unused includes
[elogind.git] / src / udev / net / link-config.c
index ad5b9563582788aae7bea953870299c51ce16bb8..810a88153c2264fdf2a986bf10219743c09d8252 100644 (file)
@@ -22,7 +22,6 @@
 #include <netinet/ether.h>
 #include <linux/netdevice.h>
 
-#include "sd-id128.h"
 
 #include "missing.h"
 #include "link-config.h"
 #include "path-util.h"
 #include "conf-parser.h"
 #include "conf-files.h"
-#include "fileio.h"
-#include "hashmap.h"
 #include "rtnl-util.h"
 #include "network-internal.h"
-#include "siphash24.h"
 
 struct link_config_ctx {
         LIST_HEAD(link_config, links);
@@ -438,9 +434,10 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
                 case MACPOLICY_PERSISTENT:
                         if (mac_is_random(device)) {
                                 r = get_mac(device, false, &generated_mac);
-                                if (r == -ENOENT)
+                                if (r == -ENOENT) {
+                                        log_warning_errno(r, "Could not generate persistent MAC address for %s: %m", old_name);
                                         break;
-                                else if (r < 0)
+                                else if (r < 0)
                                         return r;
                                 mac = &generated_mac;
                         }
@@ -448,9 +445,10 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
                 case MACPOLICY_RANDOM:
                         if (!mac_is_random(device)) {
                                 r = get_mac(device, true, &generated_mac);
-                                if (r == -ENOENT)
+                                if (r == -ENOENT) {
+                                        log_warning_errno(r, "Could not generate random MAC address for %s: %m", old_name);
                                         break;
-                                else if (r < 0)
+                                else if (r < 0)
                                         return r;
                                 mac = &generated_mac;
                         }