summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/9p/trans_xen.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 9630b1275557..6298d7731153 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -379,13 +379,19 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
int ret, i;
struct xenbus_transaction xbt;
struct xen_9pfs_front_priv *priv = NULL;
- char *versions;
+ char *versions, *v;
unsigned int max_rings, max_ring_order, len = 0;
versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
if (IS_ERR(versions))
return PTR_ERR(versions);
- if (strcmp(versions, "1")) {
+ for (v = versions; *v; v++) {
+ if (simple_strtoul(v, &v, 10) == 1) {
+ v = NULL;
+ break;
+ }
+ }
+ if (v) {
kfree(versions);
return -EINVAL;
}