Ryan
2006-Apr-10 13:37 UTC
[Xen-devel] [PATCH] tools/python pciif: fix some python format string operators
I used the wrong operator in a couple places for putting together some
error messages out of format strings. This patch corrects those
operators and fixes the strings.
Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
---
diff -r 1c03c45d0c06 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py Mon Apr 10 09:57:38 2006
+++ b/tools/python/xen/xend/server/pciif.py Mon Apr 10 09:07:59 2006
@@ -115,7 +115,7 @@
dev = PciDevice(domain, bus, slot, func)
except Exception, e:
raise VmError("pci: failed to locate device and "+
- "parse it''s resources - %s"+str(e))
+ "parse it''s resources - "+str(e))
if dev.driver!=''pciback'':
raise VmError(("pci: PCI Backend does not own device "+ \
@@ -131,7 +131,7 @@
nr_ports = size, allow_access = True)
if rc<0:
raise VmError((''pci: failed to configure I/O ports on
device ''+
- ''%s -
errno=%d'')&(dev.name,rc))
+ ''%s - errno=%d'')%(dev.name,rc))
for (start, size) in dev.iomem:
# Convert start/size from bytes to page frame sizes
@@ -147,7 +147,7 @@
allow_access = True)
if rc<0:
raise VmError((''pci: failed to configure I/O memory on
device ''+
- ''%s -
errno=%d'')&(dev.name,rc))
+ ''%s - errno=%d'')%(dev.name,rc))
if dev.irq>0:
log.debug(''pci: enabling irq %d''%dev.irq)
@@ -155,7 +155,7 @@
allow_access = True)
if rc<0:
raise VmError((''pci: failed to configure irq on device
''+
- ''%s -
errno=%d'')&(dev.name,rc))
+ ''%s - errno=%d'')%(dev.name,rc))
def waitForBackend(self,devid):
return (0, "ok - no hotplug")
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Apr-10 13:52 UTC
Re: [Xen-devel] [PATCH] tools/python pciif: fix some python format string operators
On Mon, Apr 10, 2006 at 09:37:56AM -0400, Ryan wrote:> I used the wrong operator in a couple places for putting together some > error messages out of format strings. This patch corrects those > operators and fixes the strings. > > Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>Applied, thanks. Could you provide your patches as an attachment in the future? Your patch got horribly mangled -- look how the plus signs wrap nicely onto the next line on an 80-column display, in the hunk below. Cheers, Ewan. @@ -131,7 +131,7 @@ nr_ports = size, allow_access = True) if rc<0: raise VmError((''pci: failed to configure I/O ports on device '' + - ''%s - errno=%d'')&(dev.name,rc)) + ''%s - errno=%d'')%(dev.name,rc)) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ryan
2006-Apr-10 14:11 UTC
Re: [Xen-devel] [PATCH] tools/python pciif: fix some python format string operators
On Mon, 2006-04-10 at 14:52 +0100, Ewan Mellor wrote:> > Applied, thanks. > > Could you provide your patches as an attachment in the future? Your patch got > horribly mangled -- look how the plus signs wrap nicely onto the next line on > an 80-column display, in the hunk below. > > Cheers, > > Ewan. > > @@ -131,7 +131,7 @@ > nr_ports = size, allow_access = True) > if rc<0: > raise VmError((''pci: failed to configure I/O ports on device '' > + > - ''%s - errno=%d'')&(dev.name,rc)) > + ''%s - errno=%d'')%(dev.name,rc)) >Sorry about that... I figured since this one was a small patch, I''d inline it. But I''ll send all future ones (small and large) as attachments. Ryan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel