xen_disk: treat "aio" as "raw"

Sometimes the toolstack uses "aio" without an additional format
identifier, in such cases use "raw".

Updated in v2:

- fix code style.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Stefano Stabellini 2011-06-30 15:42:31 +01:00 committed by Alexander Graf
parent 8ab934f93b
commit 7cef3f4fdb

View File

@ -633,6 +633,9 @@ static int blk_init(struct XenDevice *xendev)
blkdev->filename = blkdev->params;
}
}
if (!strcmp("aio", blkdev->fileproto)) {
blkdev->fileproto = "raw";
}
if (blkdev->mode == NULL) {
blkdev->mode = xenstore_read_be_str(&blkdev->xendev, "mode");
}