ia64/xen-unstable

changeset 8448:7c1f2e20123a

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>
author vhanquez@kneesa.uk.xensource.com
date Tue Dec 27 10:40:33 2005 +0000 (2005-12-27)
parents 5fa0c70663f1
children 8b74b9603d5e
files linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Fri Dec 23 18:28:33 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Dec 27 10:40:33 2005 +0000
     1.3 @@ -331,7 +331,12 @@ static void connect(struct blkfront_info
     1.4  		return;
     1.5  	}
     1.6  
     1.7 -        xlvbd_add(sectors, info->vdevice, binfo, sector_size, info);
     1.8 +	err = xlvbd_add(sectors, info->vdevice, binfo, sector_size, info);
     1.9 +	if (err) {
    1.10 +		xenbus_dev_fatal(info->xbdev, err, "xlvbd_add at %s",
    1.11 +		                 info->xbdev->otherend);
    1.12 +		return;
    1.13 +	}
    1.14  
    1.15  	(void)xenbus_switch_state(info->xbdev, NULL, XenbusStateConnected); 
    1.16