From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: [XEN][TOOLS][PATCH] Add one more error reason statement to blktapctrl Date: Tue, 22 May 2007 09:58:41 +0200 Message-ID: <4652A2B1.2000808@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060906070007070909080002" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-ppc-devel-bounces@lists.xensource.com Errors-To: xen-ppc-devel-bounces@lists.xensource.com To: xen-ppc-devel@lists.xensource.com, xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060906070007070909080002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mtagate3.de.ibm.com id l4M7wfQD112312 Hi, I had an issue with blktapctrl on xen-ppc. The reason is easy - currently we have no blktap in our linux tree, but=20 because blktapctrl did not print out a useful error statement in my case=20 I struggled a while to find the reason. I also saw no useful module error messages because it is not damaged,=20 its just not there in my case. This patch adds an error message if xc_find_device_number fails, all=20 other goto's to open_failed have already their error output, this just=20 adds one more. --=20 Gr=FCsse / regards,=20 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=20 Gesch=E4ftsf=FChrung: Herbert Kircher=20 Sitz der Gesellschaft: B=F6blingen Registergericht: Amtsgericht Stuttgart, HRB 243294 --------------060906070007070909080002 Content-Type: text/x-patch; name="blktapctrl_errormsg.diff" Content-Disposition: inline; filename="blktapctrl_errormsg.diff" Content-Transfer-Encoding: 7bit # HG changeset patch # User Christian Ehrhardt # 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 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); --------------060906070007070909080002 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel --------------060906070007070909080002--