From: Lennart Poettering Date: Tue, 5 Oct 2021 12:10:27 +0000 (+0200) Subject: repart: use right error variable X-Git-Tag: v250-rc1~568 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ac04a65477b59c9143b635c0c0daa5152d9b466;p=thirdparty%2Fsystemd.git repart: use right error variable --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 564ee4835bc..bfd9896f711 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -2779,7 +2779,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); @@ -3055,7 +3055,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);