All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN][TOOLS][PATCH] Add one more error reason statement to blktapctrl
@ 2007-05-22  7:58 Christian Ehrhardt
  0 siblings, 0 replies; only message in thread
From: Christian Ehrhardt @ 2007-05-22  7:58 UTC (permalink / raw)
  To: xen-ppc-devel, xen-devel

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

Hi,
I had an issue with blktapctrl on xen-ppc.
The reason is easy - currently we have no blktap in our linux tree, but 
because blktapctrl did not print out a useful error statement in my case 
I struggled a while to find the reason.
I also saw no useful module error messages because it is not damaged, 
its just not there in my case.
This patch adds an error message if xc_find_device_number fails, all 
other goto's to open_failed have already their error output, this just 
adds one more.

-- 

Grüsse / regards, 
Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
Ehrhardt@linux.vmnet.ibm.com
Ehrhardt@de.ibm.com

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen 
Geschäftsführung: Herbert Kircher 
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: blktapctrl_errormsg.diff --]
[-- Type: text/x-patch, Size: 1296 bytes --]

# HG changeset patch
# User Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
# Date 1179814369 -7200
# Node ID 6d25bbfcb3e2ce7660b5253431b0b9638d1df1bc
# Parent  be31124bbec216693cb5758ee2e6d87b3fd292b2
[XEN][TOOLS][PATCH] 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>

diff -r be31124bbec2 -r 6d25bbfcb3e2 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c	Mon May 07 05:44:46 2007 +0200
+++ b/tools/blktap/drivers/blktapctrl.c	Tue May 22 08:12:49 2007 +0200
@@ -690,8 +690,10 @@ int main(int argc, char *argv[])
 
 	/* Attach to blktap0 */
 	asprintf(&devname,"%s/%s0", BLKTAP_DEV_DIR, BLKTAP_DEV_NAME);
-	if ((ret = xc_find_device_number("blktap0")) < 0)
+	if ((ret = xc_find_device_number("blktap0")) < 0) {
+		DPRINTF("couldn't find device number for 'blktap0'\n");
 		goto open_failed;
+    }
 	blktap_major = major(ret);
 	make_blktap_dev(devname,blktap_major,0);
 	ctlfd = open(devname, O_RDWR);

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-22  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-22  7:58 [XEN][TOOLS][PATCH] Add one more error reason statement to blktapctrl Christian Ehrhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.