ia64/xen-unstable

changeset 15196:12a12637af46

blktap: Add one more error reason statement to blktapctrl

blktapctrl already prints out exits reasons for all goto's to
open_failed except of not finding a device number for blktap0
This patch adds just that message so the user will get more info than
just "Unable to start blktapctrl"
Common source of this issue is that blktap is missing/failed to
load/...

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
author kfraser@localhost.localdomain
date Thu May 24 10:50:07 2007 +0100 (2007-05-24)
parents 03c213fd2360
children acee9e2c6f8b
files tools/blktap/drivers/blktapctrl.c
line diff
     1.1 --- a/tools/blktap/drivers/blktapctrl.c	Thu May 24 10:48:58 2007 +0100
     1.2 +++ b/tools/blktap/drivers/blktapctrl.c	Thu May 24 10:50:07 2007 +0100
     1.3 @@ -690,8 +690,10 @@ int main(int argc, char *argv[])
     1.4  
     1.5  	/* Attach to blktap0 */
     1.6  	asprintf(&devname,"%s/%s0", BLKTAP_DEV_DIR, BLKTAP_DEV_NAME);
     1.7 -	if ((ret = xc_find_device_number("blktap0")) < 0)
     1.8 +	if ((ret = xc_find_device_number("blktap0")) < 0) {
     1.9 +		DPRINTF("couldn't find device number for 'blktap0'\n");
    1.10  		goto open_failed;
    1.11 +	}
    1.12  	blktap_major = major(ret);
    1.13  	make_blktap_dev(devname,blktap_major,0);
    1.14  	ctlfd = open(devname, O_RDWR);