From 709f6e46a35ec492b70eb92943d82a8d838ce918 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 5 Nov 2015 13:44:06 +0100 Subject: treewide: use the negative error codes returned by our functions Our functions return negative error codes. Do not rely on errno being set after calling our own functions. --- src/import/import-raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/import/import-raw.c') diff --git a/src/import/import-raw.c b/src/import/import-raw.c index 2193d1d7f1..7593f064fc 100644 --- a/src/import/import-raw.c +++ b/src/import/import-raw.c @@ -199,7 +199,7 @@ static int raw_import_maybe_convert_qcow2(RawImport *i) { r = chattr_fd(converted_fd, FS_NOCOW_FL, FS_NOCOW_FL); if (r < 0) - log_warning_errno(errno, "Failed to set file attributes on %s: %m", t); + log_warning_errno(r, "Failed to set file attributes on %s: %m", t); log_info("Unpacking QCOW2 file."); @@ -287,7 +287,7 @@ static int raw_import_open_disk(RawImport *i) { r = chattr_fd(i->output_fd, FS_NOCOW_FL, FS_NOCOW_FL); if (r < 0) - log_warning_errno(errno, "Failed to set file attributes on %s: %m", i->temp_path); + log_warning_errno(r, "Failed to set file attributes on %s: %m", i->temp_path); return 0; } -- cgit v1.2.3-54-g00ecf