]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev/net: ignore errors in loading .link files but warn about that
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Feb 2019 02:50:57 +0000 (11:50 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Feb 2019 02:50:57 +0000 (11:50 +0900)
src/udev/net/link-config.c

index b48e423422d62069a3085525813b68941bda512d..101d9d262bc57a2c70de482750aa6b14466348d0 100644 (file)
@@ -136,7 +136,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
 
         link = new0(link_config, 1);
         if (!link)
-                return log_oom();
+                return -ENOMEM;
 
         link->mac_policy = _MACPOLICY_INVALID;
         link->wol = _WOL_INVALID;
@@ -161,7 +161,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
 
         link->filename = strdup(filename);
         if (!link->filename)
-                return log_oom();
+                return -ENOMEM;
 
         LIST_PREPEND(links, ctx->links, link);
         link = NULL;
@@ -213,7 +213,7 @@ int link_config_load(link_config_ctx *ctx) {
         STRV_FOREACH_BACKWARDS(f, files) {
                 r = load_link(ctx, *f);
                 if (r < 0)
-                        return r;
+                        log_error_errno(r, "Failed to load %s, ignoring: %m", *f);
         }
 
         return 0;