qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-mig


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands
Date: Fri, 24 Feb 2012 12:40:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 02/24/2012 12:01 PM, Luiz Capitulino wrote:

>> +    BlockDriver *drv;
>> +    int i, j, escape;
>> +    char new_filename[2048], *filename;
> 
> I'd use PATH_MAX for new_filename's size.

PATH_MAX need not be defined (and on Hurd, it intentionally is not
defined); or might be so huge as to be useless.  But 2048 is smaller
than typical PATH_MAX of 4096, so you may still want to consider a
compromise.

>> +
>> +        new_filename[i++] = new_image_file[j];
>> +    }
> 
> IMO, you could require the filename arguments to be escaped already.

And if you do that, then the escaping should be consistent for both
arguments.  Libvirt is okay with pre-escaping file names before passing
them to qemu.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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