From: Yu Watanabe Date: Mon, 25 Feb 2019 02:50:57 +0000 (+0900) Subject: udev/net: ignore errors in loading .link files but warn about that X-Git-Tag: v242-rc1~252^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8a42907ed8d8206917c5b11d902de444a3aa91d;p=thirdparty%2Fsystemd.git udev/net: ignore errors in loading .link files but warn about that --- diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index b48e423422d..101d9d262bc 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -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;