Skip to contentSkip to conversation

libxl: When checking BDF of existing slots, function should be decimal, not hex

PATCH In review George Dunlap 3 participants 3 messages May 25, 2012 – May 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: When checking BDF of existing slots, function should be decimal, not hex

# HG changeset patch
# User George Dunlap <[email protected]>
# Date 1337961666 0
# Node ID 1c28051020488782f1277dd60a2418324580297e
# Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa
libxl: When checking BDF of existing slots, function should be decimal, not hex

tools/libxl/libxl_pci.c +1 -1
@@ -480,7 +480,7 @@ static int pciback_dev_has_slot(libxl__g
         return ERROR_FAIL;
     }
 
-    while(fscanf(f, "%x:%x:%x.%x\n", &dom, &bus, &dev, &func)==4) {
+    while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) {
         if(dom == pcidev->domain
            && bus == pcidev->bus
            && dev == pcidev->dev
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · George Dunlap

# HG changeset patch
# User George Dunlap <[email protected]>
# Date 1337961666 0
# Node ID 1c28051020488782f1277dd60a2418324580297e
# Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa
libxl: When checking BDF of existing slots, function should be decimal, not hex

Quoted 19 lines
tools/libxl/libxl_pci.c +1 -1
@@ -480,7 +480,7 @@ static int pciback_dev_has_slot(libxl__g
         return ERROR_FAIL;
     }
 
-    while(fscanf(f, "%x:%x:%x.%x\n", &dom, &bus, &dev, &func)==4) {
+    while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) {
         if(dom == pcidev->domain
            && bus == pcidev->bus
            && dev == pcidev->dev

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 8 lines · Konrad Rzeszutek Wilk
Quoted 7 lines · George Dunlap

# HG changeset patch
# User George Dunlap <[email protected]>
# Date 1337961666 0
# Node ID 1c28051020488782f1277dd60a2418324580297e
# Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa
libxl: When checking BDF of existing slots, function should be decimal, not hex

Quoted 4 lines
Quoted 1 line
Quoted 1 line

A PCI func can be at most 7 I think so %x vs %d probably doesn't have any real impact under normal use.

Applied though.

Quoted 23 lines
Quoted 14 lines
tools/libxl/libxl_pci.c +1 -1
@@ -480,7 +480,7 @@ static int pciback_dev_has_slot(libxl__g
         return ERROR_FAIL;
     }
 
-    while(fscanf(f, "%x:%x:%x.%x\n", &dom, &bus, &dev, &func)==4) {
+    while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) {
         if(dom == pcidev->domain
            && bus == pcidev->bus
            && dev == pcidev->dev
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel