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))