From 2e337e9e6dd47b04de50e02a07da1f736a89b0b6 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sun, 1 Mar 2026 12:47:32 +0800 Subject: [PATCH] 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) --- src/import/pull-raw.c | 2 +- src/import/pull-tar.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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."); -- 2.47.3