|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] mini-os: avoid crash if no console is provided
# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1328812410 0
# Node ID 37a71b91baf02bd736d1c14fda7b9d59b0eec18e
# Parent 691758c8786149c07c3050ca34823b2fdc57f568
mini-os: avoid crash if no console is provided
Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
diff -r 691758c87861 -r 37a71b91baf0 extras/mini-os/console/xencons_ring.c
--- a/extras/mini-os/console/xencons_ring.c Thu Feb 09 18:33:30 2012 +0000
+++ b/extras/mini-os/console/xencons_ring.c Thu Feb 09 18:33:30 2012 +0000
@@ -25,7 +25,10 @@
static inline struct xencons_interface *xencons_interface(void)
{
- return mfn_to_virt(start_info.console.domU.mfn);
+ if (start_info.console.domU.evtchn)
+ return mfn_to_virt(start_info.console.domU.mfn);
+ else
+ return NULL;
}
int xencons_ring_send_no_notify(struct consfront_dev *dev, const char *data,
unsigned len)
@@ -38,6 +41,8 @@
intf = xencons_interface();
else
intf = dev->ring;
+ if (!intf)
+ return sent;
cons = intf->out_cons;
prod = intf->out_prod;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |