aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-03-13 14:30:44 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-03-13 19:24:52 -0400
commit42c46e6ba5461fcab289bf4a1b7160f94c10aa28 (patch)
treeac81c4586d8925158f38d59a5c4134eeabb00440 /drivers/xen
parentcf8e019b523a8caa95b56ff0ce62a4856b14395f (diff)
xen/xenbus: ignore console/0
Unfortunately xend creates a bogus console/0 frotend/backend entry pair on xenstore that console backends cannot properly cope with. Any guest behavior that is not completely ignoring console/0 is going to either cause problems with xenconsoled or qemu. Returning 0 or -ENODEV from xencons_probe is not enough because it is going to cause the frontend state to become 4 or 6 respectively. The best possible thing we can do here is just ignore the entry from xenbus_probe_frontend. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/xenbus/xenbus_probe_frontend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 9c57819df51a..f20c5f178b40 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -53,6 +53,12 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type,
53 char *nodename; 53 char *nodename;
54 int err; 54 int err;
55 55
56 /* ignore console/0 */
57 if (!strncmp(type, "console", 7) && !strncmp(name, "0", 1)) {
58 DPRINTK("Ignoring buggy device entry console/0");
59 return 0;
60 }
61
56 nodename = kasprintf(GFP_KERNEL, "%s/%s/%s", bus->root, type, name); 62 nodename = kasprintf(GFP_KERNEL, "%s/%s/%s", bus->root, type, name);
57 if (!nodename) 63 if (!nodename)
58 return -ENOMEM; 64 return -ENOMEM;