diff options
-rw-r--r-- | net/9p/trans_xen.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index cf1b89ba522b..80cc0289dd0d 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -377,13 +377,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; } |