qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] drive_add: file names with spaces


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] drive_add: file names with spaces
Date: Mon, 30 Oct 2017 14:32:21 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

* Programmingkid (address@hidden) wrote:
> 
> > On Oct 29, 2017, at 6:21 AM, Dr. David Alan Gilbert <address@hidden> wrote:
> > 
> > * Eric Blake (address@hidden) wrote:
> >> On 10/28/2017 06:44 AM, Programmingkid wrote:
> >>> I'm trying to use an image file that has spaces in its file name (and 
> >>> sometimes in the path) to be used as a USB flash drive. When I try adding 
> >>> the image file using the drive_add command I see this error: drive_add: 
> >>> extraneous characters at the end of the line
> >>> 
> >>> I have tried using single and double quotes around the file name but this 
> >>> does not help. Is there a way to use files that have spaces in it's name 
> >>> with drive_add?
> >> 
> >> Not in HMP, which lacks quoting.  (Unless you want to patch HMP to learn
> >> quoting)
> > 
> > I think it's already got that code at least in some places.
> > monitor_parse_arguments calls get_str, and get_str understands " wrapped
> > arguments.
> > 
> > drive_add 1 "file=foo bar"
> > 
> > gives me:
> > Could not open 'foo bar': No such file or directory
> > 
> > so I think that's doing the right thing.
> > 
> > Dave
> > 
> >> But using spaces in filenames works fine in QMP.
> >> 
> >> -- 
> >> Eric Blake, Principal Software Engineer
> >> Red Hat, Inc.           +1-919-301-3266
> >> Virtualization:  qemu.org | libvirt.org
> >> 
> > 
> > 
> > --
> > Dr. David Alan Gilbert / address@hidden / Manchester, UK
> 
> Thank you so much for this info. It solved my problem :)

Now, the real challenge is how to deal with a filename with a comma in;
   drive_add 1 "file=foo,bar"
   Could not open 'foo': No such file or directory

Dave

> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]