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/blkfront.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/blkfront.c')
-rw-r--r-- | extras/mini-os/blkfront.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/extras/mini-os/blkfront.c b/extras/mini-os/blkfront.c index d59140fcb8..695d8e65ee 100644 --- a/extras/mini-os/blkfront.c +++ b/extras/mini-os/blkfront.c @@ -152,12 +152,13 @@ again: } snprintf(path, sizeof(path), "%s/state", nodename); - err = xenbus_switch_state(xbt, path, XenbusStateInitialised); + err = xenbus_switch_state(xbt, path, XenbusStateConnected); if (err) { - printk("error writing blk initialized on %s: %s\n", path, err); + message = "switching state"; goto abort_transaction; } + err = xenbus_transaction_end(xbt, 0, &retry); if (err) free(err); if (retry) { @@ -188,7 +189,6 @@ done: { XenbusState state; char path[strlen(dev->backend) + 1 + 19 + 1]; - char frontpath[strlen(nodename) + 1 + 6 + 1]; snprintf(path, sizeof(path), "%s/mode", dev->backend); msg = xenbus_read(XBT_NIL, path, &c); if (msg) { @@ -232,18 +232,7 @@ done: dev->info.flush = xenbus_read_integer(path); *info = dev->info; - - printk("%s connected\n", dev->backend); - - snprintf(frontpath, sizeof(frontpath), "%s/state", nodename); - if((err = xenbus_switch_state(XBT_NIL, frontpath, XenbusStateConnected)) - != NULL) { - printk("error switching state: %s\n", err); - xenbus_unwatch_path_token(XBT_NIL, path, path); - goto error; - } } - unmask_evtchn(dev->evtchn); printk("%u sectors of %u bytes\n", dev->info.sectors, dev->info.sector_size); |