]> 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>
Sun, 1 Mar 2026 10:24:45 +0000 (10:24 +0000)
Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
src/import/pull-raw.c
src/import/pull-tar.c

index fc681fbb59dccc4d208992888dff7eff08e19592..31a08eb24ae6d3439377aa8efc71cbae66cf16ef 100644 (file)
@@ -512,7 +512,7 @@ static void raw_pull_job_on_finished(PullJob *j) {
                  * checksum file. */
 
                 if (j == p->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 ae763879b78b21580321ddbd920d61472a4e7044..bfc218b6bcbd0340448f2c356a60aee0d38bb9d2 100644 (file)
@@ -430,7 +430,7 @@ static void tar_pull_job_on_finished(PullJob *j) {
                 clear_progress_bar(/* prefix= */ NULL);
 
                 if (j == p->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.");