diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-04 12:15:28 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-04 12:15:28 +0100 |
commit | 7203b89c15311d9a8bb7d6d645403170ce009b6c (patch) | |
tree | 9fe48d7007a0dfde9fc0a79551681689c4762aad /extras/mini-os/pcifront.c | |
parent | 335c738c440e8a283e10660d38bf82532b439cf8 (diff) | |
download | xen-7203b89c15311d9a8bb7d6d645403170ce009b6c.tar.gz xen-7203b89c15311d9a8bb7d6d645403170ce009b6c.tar.bz2 xen-7203b89c15311d9a8bb7d6d645403170ce009b6c.zip |
mini-os: Revert 21106:b20f897d6010 "Fix xenbus initialisation"
Jeremy Fitzhardinge (jeremy@goop.org) reports that this fixes HVM+stubdom.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'extras/mini-os/pcifront.c')
-rw-r--r-- | extras/mini-os/pcifront.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c index dc6c461de8..889d701271 100644 --- a/extras/mini-os/pcifront.c +++ b/extras/mini-os/pcifront.c @@ -143,7 +143,7 @@ struct pcifront_dev *init_pcifront(char *_nodename) char* err; char* message=NULL; int retry=0; - char* msg = NULL; + char* msg; char* nodename = _nodename ? _nodename : "device/pci/0"; int dom; @@ -206,7 +206,7 @@ again: snprintf(path, sizeof(path), "%s/state", nodename); err = xenbus_switch_state(xbt, path, XenbusStateInitialised); if (err) { - printk("error writing pci initialized: %s\n", err); + message = "switching state"; goto abort_transaction; } @@ -237,7 +237,7 @@ done: { char path[strlen(dev->backend) + 1 + 5 + 1]; - char frontpath[strlen(nodename) + 1 + 6 + 1]; + char frontpath[strlen(nodename) + 1 + 5 + 1]; XenbusState state; snprintf(path, sizeof(path), "%s/state", dev->backend); @@ -254,9 +254,9 @@ done: } snprintf(frontpath, sizeof(frontpath), "%s/state", nodename); - if((err = xenbus_switch_state(XBT_NIL, frontpath, XenbusStateConnected)) + if ((err = xenbus_switch_state(XBT_NIL, frontpath, XenbusStateConnected)) != NULL) { - printk("error switching state: %s\n", err); + printk("error switching state %s\n", err); xenbus_unwatch_path_token(XBT_NIL, path, path); goto error; } @@ -271,7 +271,6 @@ done: return dev; error: - free(msg); free(err); free_pcifront(dev); return NULL; |