summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/misc/tmp421.c4
-rw-r--r--util/main-loop.c3
-rw-r--r--util/systemd.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/hw/misc/tmp421.c b/hw/misc/tmp421.c
index 9f044705fa..c0bc150bca 100644
--- a/hw/misc/tmp421.c
+++ b/hw/misc/tmp421.c
@@ -120,7 +120,7 @@ static void tmp421_get_temperature(Object *obj, Visitor *v, const char *name,
int tempid;
if (sscanf(name, "temperature%d", &tempid) != 1) {
- error_setg(errp, "error reading %s: %m", name);
+ error_setg(errp, "error reading %s: %s", name, g_strerror(errno));
return;
}
@@ -160,7 +160,7 @@ static void tmp421_set_temperature(Object *obj, Visitor *v, const char *name,
}
if (sscanf(name, "temperature%d", &tempid) != 1) {
- error_setg(errp, "error reading %s: %m", name);
+ error_setg(errp, "error reading %s: %s", name, g_strerror(errno));
return;
}
diff --git a/util/main-loop.c b/util/main-loop.c
index e3eaa55866..eda63fe4e0 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -61,7 +61,8 @@ static void sigfd_handler(void *opaque)
}
if (len != sizeof(info)) {
- printf("read from sigfd returned %zd: %m\n", len);
+ error_report("read from sigfd returned %zd: %s", len,
+ g_strerror(errno));
return;
}
diff --git a/util/systemd.c b/util/systemd.c
index d22e86c707..1dd0367d9a 100644
--- a/util/systemd.c
+++ b/util/systemd.c
@@ -60,8 +60,8 @@ unsigned int check_socket_activation(void)
* and we should exit.
*/
error_report("Socket activation failed: "
- "invalid file descriptor fd = %d: %m",
- fd);
+ "invalid file descriptor fd = %d: %s",
+ fd, g_strerror(errno));
exit(EXIT_FAILURE);
}
}