From: "andrzej zaborowski" <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Subject: Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Date: Wed, 9 Jan 2008 13:44:10 +0100 [thread overview]
Message-ID: <fb249edb0801090444w61d35bfctd9a6af79b2d7a7c6@mail.gmail.com> (raw)
In-Reply-To: <1199880481.4337.31.camel@frecb07144>
On 09/01/2008, Laurent Vivier <Laurent.Vivier@bull.net> wrote:
> Le mercredi 09 janvier 2008 à 11:40 +0100, andrzej zaborowski a écrit :
> > On 09/01/2008, Laurent Vivier <Laurent.Vivier@bull.net> wrote:
> > > Le mercredi 09 janvier 2008 à 10:31 +0100, Laurent Vivier a écrit :
> > > > Le mardi 08 janvier 2008 à 17:17 +0100, Hervé Poussineau a écrit :
> > > > > Hi,
> > > > >
> > > > > On Windows, since December 2nd, files names provided in command line
> > > > > have to double their backslash to work correctly, for example: "-hda
> > > > > c:\\disks\\qemu.qcow" instead of -hda c:\disks\qemu.qcow"
> > > > > This patch removes this need and reverts back to Qemu 0.9.0 behaviour
> > > > >
> > > > > Hervé
> > > > >
> > > >
> > > > I have introduced this behavior to be able to use command line like
> > > > "qemu -hda my\ file", IMHO your patch should be #ifdef for window only.
> > >
> > > In fact, this is a wrong example, this case is managed by the shell.
> > > A good example is when we have a filename with a '"' in it:
> > >
> > > qemu -hda 2\\\"file
> > >
> > > to open file 2"file
> >
> > And the correct behaviour for that would be to open the file 2\"file, while
> >
> > qemu -hda 2\"file
> >
> > should open 2"file. The only character that we may need to handle
> > specially should be the comma, I don't know if anyone cares.
>
> You're right...
> but "-hda" is an alias for "-drive file="%s",index=%d,media=disk".
It should be an alias for "-drive file=%s,index=%d,media=disk"
>
> So when you type "qemu -hda 2\"file",
> it becomes "qemu -drive file="2"file",index=0,media=disk"
> which gives filename equal to "2file,index=0,media=disk" instead of
> filename equal to 2"file with option index and media.
" and \ should not be treated specially by -drive. This is what I
meant in the previous mails. So that the filename becomes 2"file
(everything up to the comma or end of string).
>
> So the '\' is needed, and you must have "qemu -hda 2\\\"file" to
> have "qemu -drive file="2\"file",index=0,media=disk" and then can
> extract filename to 2"file
>
> In the alias, file="%s" is needed to be able to manage filenames with
> spaces. for instance, if you don't have '"", you will have:
> qemu -hda "my file"
> -> qemu -drive file=my file,index=0,media=disk
> and thus filename is "my"...
It should be everything up to the comma, treating spaces specially
gives you nothing.
Regards
next prev parent reply other threads:[~2008-01-09 12:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 16:17 [Qemu-devel] [PATCH] Fix double backslash problem in Windows Hervé Poussineau
2008-01-09 9:31 ` Laurent Vivier
2008-01-09 9:51 ` andrzej zaborowski
2008-01-09 10:04 ` Laurent Vivier
2008-01-09 10:40 ` andrzej zaborowski
2008-01-09 12:08 ` Laurent Vivier
2008-01-09 12:27 ` Johannes Schindelin
2008-01-09 12:51 ` Laurent Vivier
2008-01-09 13:27 ` Johannes Schindelin
2008-01-09 13:46 ` Laurent Vivier
2008-01-09 13:56 ` andrzej zaborowski
2008-01-09 14:45 ` Laurent Vivier
2008-01-09 13:59 ` Johannes Schindelin
2008-01-09 14:42 ` Laurent Vivier
2008-01-10 9:35 ` Laurent Vivier
2008-01-10 11:53 ` Johannes Schindelin
2008-01-10 12:12 ` Laurent Vivier
2008-01-10 12:15 ` Johannes Schindelin
2008-01-10 12:33 ` Laurent Vivier
2008-01-10 13:30 ` Avi Kivity
2008-01-10 13:58 ` Laurent Vivier
2008-01-10 14:18 ` [Qemu-devel] " Jernej Simončič
2008-01-10 15:02 ` Laurent Vivier
2008-01-10 18:13 ` Laurent Vivier
2008-01-11 9:01 ` Laurent Vivier
2008-01-10 18:59 ` [Qemu-devel] Re: [PATCH] " consul
2008-01-10 19:21 ` Laurent Vivier
2008-01-09 12:27 ` [Qemu-devel] " Andreas Färber
2008-01-09 13:24 ` Laurent Vivier
2008-01-09 12:44 ` andrzej zaborowski [this message]
2008-01-09 17:53 ` Anthony Liguori
2008-01-09 18:23 ` Johannes Schindelin
2008-01-09 19:11 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb249edb0801090444w61d35bfctd9a6af79b2d7a7c6@mail.gmail.com \
--to=balrogg@gmail.com \
--cc=hpoussin@reactos.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).