[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen-unstable] pass-through: only parse single BDFs.



commit 0a850285ce9949caa9f9bf519f20061d013d0134
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Wed Jun 3 15:39:26 2009 +0100

    pass-through: only parse single BDFs.
    
    As of "qemu-xen: hot-plug PCI devices at boot-time", the BDF string
    that is parsed always contains a single bdf, not multiple bdf's delimited
    by a '-'.
    
    Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
    Cc: Edwin Zhai <edwin.zhai@xxxxxxxxx>
    Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 hw/pass-through.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index cf04924..a848164 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -828,11 +828,11 @@ static int token_value(char *token)
     return strtol(token, NULL, 16);
 }
 
-static int next_bdf(char **str, int *seg, int *bus, int *dev, int *func,
-                    char **opt, int *vslot)
+static int parse_bdf(char **str, int *seg, int *bus, int *dev, int *func,
+                     char **opt, int *vslot)
 {
     char *token, *endptr;
-    const char *delim = ":.-";
+    const char *delim = ":.";
 
     if ( !(*str) ||
           ( !strchr(*str, ':') && !strchr(*str, '.')) )
@@ -948,7 +948,7 @@ int insert_to_pci_slot(char *bdf_slt)
     int seg, bus, dev, func, slot;
     char *opt;
 
-    if ( !next_bdf(&bdf_slt, &seg, &bus, &dev, &func, &opt, &slot) )
+    if ( !parse_bdf(&bdf_slt, &seg, &bus, &dev, &func, &opt, &slot) )
     {
         return -1;
     }
@@ -979,7 +979,7 @@ int bdf_to_slot(char *bdf_str)
     int seg, bus, dev, func, slot, i;
     char *opt;
 
-    if ( !next_bdf(&bdf_str, &seg, &bus, &dev, &func, &opt, &slot))
+    if ( !parse_bdf(&bdf_str, &seg, &bus, &dev, &func, &opt, &slot))
     {
         return -1;
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.