From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MR61m-0005GI-Cz for qemu-devel@nongnu.org; Wed, 15 Jul 2009 11:04:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR61l-0005Ft-OR for qemu-devel@nongnu.org; Wed, 15 Jul 2009 11:04:13 -0400 Received: from [199.232.76.173] (port=44312 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR61l-0005Fi-FN for qemu-devel@nongnu.org; Wed, 15 Jul 2009 11:04:13 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:19549) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MR61k-0002aI-SS for qemu-devel@nongnu.org; Wed, 15 Jul 2009 11:04:13 -0400 Received: by fg-out-1718.google.com with SMTP id d23so1531405fga.8 for ; Wed, 15 Jul 2009 08:04:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1247644283.14246.3.camel@localhost> References: <1245862739.6278.7.camel@localhost> <1245998284.6278.99.camel@localhost> <4A447C8D.5000104@kevin-wolf.de> <1246063310.6278.115.camel@localhost> <1246511321.6429.31.camel@localhost> <4A4C754D.10109@redhat.com> <4A4CAD86.9020607@us.ibm.com> <4A4CB39F.5070506@redhat.com> <1247041831.6297.12.camel@localhost> <1247644283.14246.3.camel@localhost> Date: Wed, 15 Jul 2009 18:04:11 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH] rev5: support colon in filenames From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: linuxram@us.ibm.com Cc: Kevin Wolf , Anthony Liguori , Jan Kiszka , qemu-devel@nongnu.org, kvm-devel On 7/15/09, Ram Pai wrote: > Problem: It is impossible to feed filenames with the character colon because > qemu interprets such names as a protocol. For example filename scsi:0, is > interpreted as a protocol by name "scsi". > --- a/block/raw-posix.c > +++ b/block/raw-posix.c > +static int qemu_open(const char *filename, int flags, ...) > --- a/block/raw-win32.c > +++ b/block/raw-win32.c > + fd = qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, I bet this won't compile on win32. Instead of this (IMHO doomed) escape approach, maybe the filename parameter could be specified as the next argument, for example: -hda format=qcow2,blah,blah,filename_is_next_arg -hda "filename with funky characters like ',' ':' & '!'"