mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Prevent vbd frontend from oopsing if the underlying device doesn't exist.
Signed-off-by: Horms <horms@verge.net.au> Signed-off-by: Vincent Hanquez <vincent@xensource.com>
This commit is contained in:
1 parent
62cc71c8a8
commit
9ab2587f30
1 file changed
+6
-1
@@ -331,7 +331,12 @@ static void connect(struct blkfront_info *info)
|
||||
return;
|
||||
}
|
||||
|
||||
xlvbd_add(sectors, info->vdevice, binfo, sector_size, info);
|
||||
err = xlvbd_add(sectors, info->vdevice, binfo, sector_size, info);
|
||||
if (err) {
|
||||
xenbus_dev_fatal(info->xbdev, err, "xlvbd_add at %s",
|
||||
info->xbdev->otherend);
|
||||
return;
|
||||
}
|
||||
|
||||
(void)xenbus_switch_state(info->xbdev, NULL, XenbusStateConnected);
|
||||
|
||||
|
||||