Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lgln6-0007g7-VQ for qemu-devel@nongnu.org; Mon, 09 Mar 2009 16:09:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lgln4-0007bX-4l for qemu-devel@nongnu.org; Mon, 09 Mar 2009 16:09:34 -0400 Received: from [199.232.76.173] (port=36157 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lgln3-0007ax-O3 for qemu-devel@nongnu.org; Mon, 09 Mar 2009 16:09:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:2657) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lgln3-00076B-Ew for qemu-devel@nongnu.org; Mon, 09 Mar 2009 16:09:33 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LggOp-0005rX-5O for qemu-devel@nongnu.org; Mon, 09 Mar 2009 10:24:11 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n29EL804029406 for ; Mon, 9 Mar 2009 10:21:08 -0400 Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH][RFC] Handling ':' on filenames From: Eduardo Habkost References: <20090306212830.GL5077@blackpad> <49B3ABDF.2080803@redhat.com> In-Reply-To: <49B3ABDF.2080803@redhat.com> Date: Mon, 09 Mar 2009 11:21:04 -0300 Message-Id: <1236608360-sup-2401@blackpad> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm_autotest Cc: qemu-devel Excerpts from kvm_autotest's message of Dom Mar 08 08:28:31 -0300 2009: > Eduardo Habkost wrote: > > This patch fixes this issue: > > > > $ qemu-img create -f qcow2 /tmp/a:b 1G > > $ qemu-system-x86_64 -hda qcow2:/tmp/a:b > > qemu: could not open disk image /tmp/a:b > > $ > > This patch looks good to me with the following comments: > > 1. I think the example above is wrong. > a. There is no protocol "qcow2" > b. We do not want to use "qcow2:/tmp/a:b" as filenames (been there). > We want to use -drive file=/tmp/a:b,format=qcow2 (and > similar "qemu-img info -f "). Oops. Ignore that, I've pasted the wrong command-line. That was when I was testing the behaviour of qemu when I specified other things before the colon. The error appears when I do this: $ qemu-system-x86_64 -hda /tmp/a:b > c. But, without this patch, even when using appropriate -drive, we'd > still get the same result (could not open disk image). > Qemu considers "/tmp/a" to be a protocol, which does not exist, > so Qemu fails to open the image. > With this patch, Qemu opens the file successfully. > Yes. > > > > Based on a suggestion by Daniel Berrange. > > > > However, this is still just a workaround. The semantics of filenames > > containing colon characters (and how this can be escaped, avoided, > > or worked around) are not very clear. > > > > Going further, what if we stop using "protocol:filename" strings > > internally, except where the user interface or external data really > > requires this format? > > 2. Do you mean something like adding a '-drive protocol=xxx' option ? Where possible, yes. -- Eduardo