[libvirt] [libvirt[]PATCH v2] Fix URI alias prefix matching

lvroyce lvroyce at linux.vnet.ibm.com
Tue Nov 1 08:10:10 UTC 2011


On 2011?11?01? 15:12, Philipp Hahn wrote:
> Now you have it the other way around, that any prefix matches:
>   "virsh -c hai" will match "hail".
> Why not simply use STREQ instead of STREQLEN?
>
> Sincerely
> Philipp
ooooooops..You're right.But here I think we can't use STREQ because in 
config file the compared string is "hail=qemu:///system"not just "hail" 
with  NULL followed

is this one right?

     size_t alias_len;
     alias_len = strlen(alias);

     if (STREQLEN(entry->str, alias, alias_len) && alias_len == 
(offset-entry->str))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111101/f187947c/attachment-0001.htm>


More information about the libvir-list mailing list