From mboxrd@z Thu Jan 1 00:00:00 1970 From: Blue Swirl Subject: Re: [Qemu-devel] [PATCH] rev5: support colon in filenames Date: Wed, 15 Jul 2009 18:04:11 +0300 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, Kevin Wolf , Anthony Liguori , Jan Kiszka , kvm-devel To: linuxram@us.ibm.com Return-path: Received: from fg-out-1718.google.com ([72.14.220.156]:15177 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755208AbZGOPEN (ORCPT ); Wed, 15 Jul 2009 11:04:13 -0400 Received: by fg-out-1718.google.com with SMTP id e21so1122842fga.17 for ; Wed, 15 Jul 2009 08:04:11 -0700 (PDT) In-Reply-To: <1247644283.14246.3.camel@localhost> Sender: kvm-owner@vger.kernel.org List-ID: 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 ',' ':' & '!'"