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

Re: [libvirt] [PATCH 1/2] Adding Storage Management driver (semantic changes)



On 06/23/2010 04:49 PM, Eduardo Otubo wrote:
> +    virBufferVSprintf(&buf, "|sed -e 's/^LV IDENTIFIER://' -e 's/\\ //g'");

You still missed some of these instances of non-portable '\ ' escape to
sed.  I've cleaned it up in my refactoring.

> +        virBufferVSprintf(&buf, "\'");

Minor optimization - it is rather more efficient to use
virBufferAddChar(&buf, '\'') than virBufferVSprintf(&buf, "\'") - I've
added that in my refactoring.

> +    if (system_type == HMC) {
> +        virBufferVSprintf(&buf, "viosvrcmd -m %s --id %d -c ",
> +                          managed_system, vios_id);
> +        virBufferVSprintf(&buf, "'lsvg -lv %s -field lvname'", pool->name);
> +    } else {
> +        virBufferVSprintf(&buf, "lsvg -lv %s -field lvname", pool->name);
> +    }
> +    virBufferVSprintf(&buf, "grep -c '^.*$'");

And this was still a disaster waiting to happen for non-HVMC (passing
-field lvnamegrep to lsvg instead of piping lsvg -field name to grep).

Are you sure you caught all of my review issues from the first time around?

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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