From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG5Bl-00060o-F2 for qemu-devel@nongnu.org; Mon, 24 Sep 2012 05:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG5Bf-0002il-NW for qemu-devel@nongnu.org; Mon, 24 Sep 2012 05:42:53 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:50293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG5Bf-0002iT-4v for qemu-devel@nongnu.org; Mon, 24 Sep 2012 05:42:47 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Sep 2012 15:12:43 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8O9gcD865863870 for ; Mon, 24 Sep 2012 15:12:39 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8OFCCxl019995 for ; Mon, 24 Sep 2012 20:42:15 +0530 Date: Mon, 24 Sep 2012 15:14:36 +0530 From: Bharata B Rao Message-ID: <20120924094436.GO18470@in.ibm.com> References: <20120924091340.GN18470@in.ibm.com> <1188499798.360668.1348478813655.JavaMail.root@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1188499798.360668.1348478813655.JavaMail.root@redhat.com> Subject: Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend. Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Anthony Liguori , Anand Avati , Vijay Bellur , qemu-devel@nongnu.org, Stefan Hajnoczi , Harsh Bora , Amar Tumballi , "Richard W.M. Jones" , Daniel Veillard , Blue Swirl , Avi Kivity On Mon, Sep 24, 2012 at 05:26:53AM -0400, Paolo Bonzini wrote: > > + qp = query_params_parse(unescape_str); > > query_params_parse already does the unescaping. Hmm it failed to parse the options properly when I had an escape sequence, hence resorted to unescaping the query string manually. Look at the below gdb debug steps of your uri.c... 2302 test("gluster+unix:///b?c=d%26e=f"); (gdb) s test (x=0x4062c4 "gluster+unix:///b?c=d%26e=f") at uri.c:2279 2279 URI *uri = uri_parse(x); (gdb) n 2283 if (!uri) { (gdb) p *uri $1 = {scheme = 0x607070 "gluster+unix", opaque = 0x0, authority = 0x0, server = 0x0, user = 0x0, port = 0, path = 0x607090 "/b", fragment = 0x0, cleanup = 0, query = 0x6070b0 "c=d%26e=f"} (gdb) n 2289 qp = query_params_parse(uri->query); (gdb) p *qp $2 = {n = 1, alloc = 1, p = 0x6070f0} You can see that qp->n is still 1, but 2 was expected. Regards, Bharata.