chiark / gitweb /
timedatectl: remove unused variables
[elogind.git] / src / import / pull-tar.c
index 16994e1c242044ecac3e8d892078fa932fc96617..58cafdd7891d93c3710260ae66402ea12117ef65 100644 (file)
@@ -281,8 +281,9 @@ static void tar_pull_job_on_finished(PullJob *j) {
                 if (r < 0)
                         goto finish;
 
-                if (renameat2(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path, RENAME_NOREPLACE) < 0) {
-                        r = log_error_errno(errno, "Failed to rename to final image name: %m");
+                r = rename_noreplace(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path);
+                if (r < 0) {
+                        log_error_errno(r, "Failed to rename to final image name: %m");
                         goto finish;
                 }