summaryrefslogtreecommitdiff
path: root/util/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/error.c')
-rw-r--r--util/error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/error.c b/util/error.c
index f11f1d57a0..9dcde42e8c 100644
--- a/util/error.c
+++ b/util/error.c
@@ -71,7 +71,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
va_start(ap, fmt);
msg1 = g_strdup_vprintf(fmt, ap);
if (os_errno != 0) {
- err->msg = g_strdup_printf("%s: %s", msg1, strerror(os_errno));
+ err->msg = g_strdup_printf("%s: %s", msg1, strerror(abs(os_errno)));
g_free(msg1);
} else {
err->msg = msg1;