From 453c7b64421b0520de33fdc130863f60a0f1bf9c Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 6 Apr 2010 07:13:19 +0100 Subject: mini-os: Fix xenbus initialisation This fixes xenbus initialization of blkfront, netfront and pcifront by uniformizing with fbfront: after writing parameters, set state to initialised, then wait for backend to switch to connect state, and then only read its parameter and switch to the connect state. Signed-off-by: Samuel Thibault --- extras/mini-os/fbfront.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extras/mini-os/fbfront.c') diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c index 7ab4778e67..fa4fc428cc 100644 --- a/extras/mini-os/fbfront.c +++ b/extras/mini-os/fbfront.c @@ -126,8 +126,8 @@ again: snprintf(path, sizeof(path), "%s/state", nodename); err = xenbus_switch_state(xbt, path, XenbusStateInitialised); if (err) { - printk("error writing initialized: %s\n", err); - free(err); + printk("error writing fb initialized: %s\n", err); + goto abort_transaction; } err = xenbus_transaction_end(xbt, 0, &retry); @@ -189,6 +189,7 @@ done: printk("************************** KBDFRONT\n"); return dev; + error: free(msg); free(err); -- cgit v1.2.3