From d604b4f71dd182eda52139a6f38ae1bfcfc3bc95 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <3e77d4faf00d4821ff5c0d16f18f5abfc222f3e0.1350899902.git.minovotn@redhat.com> References: <3e77d4faf00d4821ff5c0d16f18f5abfc222f3e0.1350899902.git.minovotn@redhat.com> From: Luiz Capitulino Date: Thu, 18 Oct 2012 19:20:02 +0200 Subject: [PATCH 4/4] qemu-ga: pass error message to OpenFileFailed error RH-Author: Luiz Capitulino Message-id: <20121018162002.3668251c@doriath.home> Patchwork-id: 43370 O-Subject: [RHEL6.4 qemu-kvm PATCH] qemu-ga: pass error message to OpenFileFailed error Bugzilla: 867983 RH-Acked-by: Laszlo Ersek RH-Acked-by: Pavel Hrdina RH-Acked-by: Kevin Wolf Bugzilla: 867983 Upstream-status: N/A - RHEL-only The series that fixed bug 806775 (commits f566cc7..e17a359) forgot to update qemu-ga, leaving it with an empty reason string. Fix it now by adding a proper call to strerror(). Signed-off-by: Luiz Capitulino --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Michal Novotny --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index f04cbd3..490856e 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -135,7 +135,7 @@ int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, E slog("guest-file-open called, filepath: %s, mode: %s", path, mode); fh = fopen(path, mode); if (!fh) { - error_set(err, QERR_OPEN_FILE_FAILED, path, ""); + error_set(err, QERR_OPEN_FILE_FAILED, path, strerror(errno)); return -1; } -- 1.7.11.7