From: Weixie Cui Date: Sun, 1 Mar 2026 04:47:32 +0000 (+0800) Subject: fix: check error with -ENOMEDIUM not ENOMEDIUM X-Git-Tag: v257.12~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e337e9e6dd47b04de50e02a07da1f736a89b0b6;p=thirdparty%2Fsystemd.git fix: check error with -ENOMEDIUM not ENOMEDIUM Signed-off-by: Weixie Cui (cherry picked from commit 4980bd05b115261cb5dfbab69af9fdd3f5832493) (cherry picked from commit 3c7ea0cf9fc219538cc6d7971e66bc769563fe5e) (cherry picked from commit eeb2fb30f8f298c48f40c9a7f47f0e37b01fc886) --- diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c index 27e95adf8fd..8811985a582 100644 --- a/src/import/pull-raw.c +++ b/src/import/pull-raw.c @@ -527,7 +527,7 @@ static void raw_pull_job_on_finished(PullJob *j) { * checksum file. */ if (j == i->raw_job) { - if (j->error == ENOMEDIUM) /* HTTP 404 */ + if (j->error == -ENOMEDIUM) /* HTTP 404 */ r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)"); else r = log_error_errno(j->error, "Failed to retrieve image file."); diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index 0336adeb5df..e5ba0dad0c8 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -335,7 +335,7 @@ static void tar_pull_job_on_finished(PullJob *j) { if (j->error != 0) { if (j == i->tar_job) { - if (j->error == ENOMEDIUM) /* HTTP 404 */ + if (j->error == -ENOMEDIUM) /* HTTP 404 */ r = log_error_errno(j->error, "Failed to retrieve image file. (Wrong URL?)"); else r = log_error_errno(j->error, "Failed to retrieve image file.");