summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-10-05 14:10:27 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-10-12 18:05:25 +0200
commit4f3d072cbf7397ce5e2d9f68f34139a0124f6a9a (patch)
tree32ee066fe1d63ba82cf920e5eccec90b8865b714
parent9561c3f1b87b3ab10d986fbceac1bb01f055f9e5 (diff)
downloadsystemd-4f3d072cbf7397ce5e2d9f68f34139a0124f6a9a.tar.gz
repart: use right error variable
(cherry picked from commit 8ac04a65477b59c9143b635c0c0daa5152d9b466) (cherry picked from commit b57f76bff912de738a8da8feceb298160bebab26)
-rw-r--r--src/partition/repart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 4cac2979cf..d56feb1dd3 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -2636,7 +2636,7 @@ static int context_copy_blocks(Context *context) {
return log_error_errno(r, "Failed to copy in data from '%s': %m", p->copy_blocks_path);
if (fsync(target_fd) < 0)
- return log_error_errno(r, "Failed to synchronize copied data blocks: %m");
+ return log_error_errno(errno, "Failed to synchronize copied data blocks: %m");
if (p->encrypt != ENCRYPT_OFF) {
encrypted_dev_fd = safe_close(encrypted_dev_fd);
@@ -2874,7 +2874,7 @@ static int context_mkfs(Context *context) {
if (p->encrypt != ENCRYPT_OFF) {
if (fsync(encrypted_dev_fd) < 0)
- return log_error_errno(r, "Failed to synchronize LUKS volume: %m");
+ return log_error_errno(errno, "Failed to synchronize LUKS volume: %m");
encrypted_dev_fd = safe_close(encrypted_dev_fd);
r = deactivate_luks(cd, encrypted);