]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fix: check error with -ENOMEDIUM not ENOMEDIUM
authorWeixie Cui <cuiweixie@gmail.com>
Sun, 1 Mar 2026 04:47:32 +0000 (12:47 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 12 Mar 2026 20:13:23 +0000 (20:13 +0000)
Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
(cherry picked from commit 4980bd05b115261cb5dfbab69af9fdd3f5832493)
(cherry picked from commit 3c7ea0cf9fc219538cc6d7971e66bc769563fe5e)
(cherry picked from commit eeb2fb30f8f298c48f40c9a7f47f0e37b01fc886)

src/import/pull-raw.c
src/import/pull-tar.c

index 27e95adf8fd62cebf18f21f5b5e4ccac534ca86a..8811985a582688e7f170d90bac12c97b68d5228e 100644 (file)
@@ -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.");
index 0336adeb5dfd9704eaa116ff39b0ffaf30f07da2..e5ba0dad0c82ec88645a773535df9d2341d0e358 100644 (file)
@@ -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.");