On Fri, Nov 19, 2010 at 11:23:00AM -0700, Eric Blake wrote:
On 11/12/2010 09:22 AM, Daniel P. Berrange wrote:
> The "find-storage-pool-sources-as" command takes two arguments,
> a hostname and a port number. For some reason the code would
> also then look for a port number appended to the hostname
> string by searching for ':'. This totally breaks if the user
> gives an IPv6 address, and is redundant, since you can already
> provide a port as a separate argument
>
> * tools/virsh.c: Remove bogus port number handling code
> ---
> tools/virsh.c | 11 ++---------
> 1 files changed, 2 insertions(+), 9 deletions(-)
>
> virBuffer buf = VIR_BUFFER_INITIALIZER;
> virBufferAddLit(&buf, "<source>\n");
> virBufferVSprintf(&buf, " <host
name='%.*s'",(int)hostlen, host);
However, given that we are no longer computing hostlen as anything other
than strlen(host), I would recommend that you respin this patch to
completely get rid of hostlen, and use %s instead of %.*s.
Yep I'll kill that.
Daniel