summaryrefslogtreecommitdiffstats
path: root/hw/xen/xen_pt.c
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2015-06-05 13:04:18 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-06-23 16:18:31 +0000
commit3782f60d2047cb86567889307ce78baacf518635 (patch)
treed37e174a7e41195473133d10007c74401c366805 /hw/xen/xen_pt.c
parent69976894c1d91c4b0c985fa05936cb6b8d01382b (diff)
downloadhqemu-3782f60d2047cb86567889307ce78baacf518635.zip
hqemu-3782f60d2047cb86567889307ce78baacf518635.tar.gz
xen/pass-through: log errno values rather than function return ones
Functions setting errno commonly return just -1, which is of no particular use in the log file. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen/xen_pt.c')
-rw-r--r--hw/xen/xen_pt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 7b8a31e..329dbd2 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -615,8 +615,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
guest_port, machine_port, size,
op);
if (rc) {
- XEN_PT_ERR(d, "%s ioport mapping failed! (rc: %i)\n",
- adding ? "create new" : "remove old", rc);
+ XEN_PT_ERR(d, "%s ioport mapping failed! (err: %i)\n",
+ adding ? "create new" : "remove old", errno);
}
} else {
pcibus_t guest_addr = sec->offset_within_address_space;
@@ -629,8 +629,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
XEN_PFN(size + XC_PAGE_SIZE - 1),
op);
if (rc) {
- XEN_PT_ERR(d, "%s mem mapping failed! (rc: %i)\n",
- adding ? "create new" : "remove old", rc);
+ XEN_PT_ERR(d, "%s mem mapping failed! (err: %i)\n",
+ adding ? "create new" : "remove old", errno);
}
}
}
@@ -744,8 +744,8 @@ static int xen_pt_initfn(PCIDevice *d)
rc = xc_physdev_map_pirq(xen_xc, xen_domid, machine_irq, &pirq);
if (rc < 0) {
- XEN_PT_ERR(d, "Mapping machine irq %u to pirq %i failed, (rc: %d)\n",
- machine_irq, pirq, rc);
+ XEN_PT_ERR(d, "Mapping machine irq %u to pirq %i failed, (err: %d)\n",
+ machine_irq, pirq, errno);
/* Disable PCI intx assertion (turn on bit10 of devctl) */
cmd |= PCI_COMMAND_INTX_DISABLE;
@@ -766,8 +766,8 @@ static int xen_pt_initfn(PCIDevice *d)
PCI_SLOT(d->devfn),
e_intx);
if (rc < 0) {
- XEN_PT_ERR(d, "Binding of interrupt %i failed! (rc: %d)\n",
- e_intx, rc);
+ XEN_PT_ERR(d, "Binding of interrupt %i failed! (err: %d)\n",
+ e_intx, errno);
/* Disable PCI intx assertion (turn on bit10 of devctl) */
cmd |= PCI_COMMAND_INTX_DISABLE;
@@ -776,7 +776,7 @@ static int xen_pt_initfn(PCIDevice *d)
if (xen_pt_mapped_machine_irq[machine_irq] == 0) {
if (xc_physdev_unmap_pirq(xen_xc, xen_domid, machine_irq)) {
XEN_PT_ERR(d, "Unmapping of machine interrupt %i failed!"
- " (rc: %d)\n", machine_irq, rc);
+ " (err: %d)\n", machine_irq, errno);
}
}
s->machine_irq = 0;
@@ -814,9 +814,9 @@ static void xen_pt_unregister_device(PCIDevice *d)
0 /* isa_irq */);
if (rc < 0) {
XEN_PT_ERR(d, "unbinding of interrupt INT%c failed."
- " (machine irq: %i, rc: %d)"
+ " (machine irq: %i, err: %d)"
" But bravely continuing on..\n",
- 'a' + intx, machine_irq, rc);
+ 'a' + intx, machine_irq, errno);
}
}
@@ -834,9 +834,9 @@ static void xen_pt_unregister_device(PCIDevice *d)
rc = xc_physdev_unmap_pirq(xen_xc, xen_domid, machine_irq);
if (rc < 0) {
- XEN_PT_ERR(d, "unmapping of interrupt %i failed. (rc: %d)"
+ XEN_PT_ERR(d, "unmapping of interrupt %i failed. (err: %d)"
" But bravely continuing on..\n",
- machine_irq, rc);
+ machine_irq, errno);
}
}
}
OpenPOWER on IntegriCloud