summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-02-01 15:36:11 +1100
committerAdam Jackson <ajax@redhat.com>2008-02-14 07:52:02 +1100
commitf3b3b37ec6197f8884417fbc26630d3a28f2e319 (patch)
tree345a9462eea606d927f3007992c6830b0000e4bb /hw/kdrive
parentb740b865e4c156a40adc6b63fcf215156fc9151a (diff)
Use strerror instead of errno values in user strings.
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/linux/linux.c2
-rw-r--r--hw/kdrive/src/kmap.c8
-rw-r--r--hw/kdrive/vesa/vm86.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 23cd8f59f..258dc7b81 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -441,7 +441,7 @@ LinuxFini (void)
memset (&vts, '\0', sizeof (vts)); /* valgrind */
ioctl (fd, VT_GETSTATE, &vts);
if (ioctl (fd, VT_DISALLOCATE, vtno) < 0)
- fprintf (stderr, "Can't deallocate console %d errno %d\n", vtno, errno);
+ fprintf (stderr, "Can't deallocate console %d %s\n", vtno, strerror(errno));
close (fd);
}
return;
diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c
index b92c1a84f..ce1e28ae4 100644
--- a/hw/kdrive/src/kmap.c
+++ b/hw/kdrive/src/kmap.c
@@ -132,8 +132,8 @@ KdSetMappedMode (CARD32 addr, CARD32 size, int mode)
sentry.type = type;
if (ioctl (mtrr, MTRRIOC_ADD_ENTRY, &sentry) < 0)
- ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (errno %d)\n",
- base, bound - base, type, errno);
+ ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (%s)\n",
+ base, bound - base, type, strerror(errno));
}
#endif
}
@@ -171,8 +171,8 @@ KdResetMappedMode (CARD32 addr, CARD32 size, int mode)
sentry.type = type;
if (ioctl (mtrr, MTRRIOC_DEL_ENTRY, &sentry) < 0)
- ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (errno %d)\n",
- base, bound - base, type, errno);
+ ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (%s)\n",
+ base, bound - base, type, strerror(errno));
}
#endif
}
diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c
index 78fc593a7..0f7bb2262 100644
--- a/hw/kdrive/vesa/vm86.c
+++ b/hw/kdrive/vesa/vm86.c
@@ -567,7 +567,7 @@ vm86_loop(Vm86InfoPtr vi)
if(errno == ENOSYS) {
ErrorF("No vm86 support. Are you running on AMD64?\n");
} else {
- ErrorF("vm86 failed (errno = %d).\n", errno);
+ ErrorF("vm86 failed (%s).\n", strerror(errno));
Vm86Debug(vi);
}
} else {