Re: [PATCH] Fix URI alias prefix matching

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

 



On 10/31/2011 06:00 AM, Wen Ruo Lv wrote:
From: lvroyce<lvroyce@lvroyce-ThinkPad-T420.(none)>

That won't work. You need to fix your ~/.gitconfig to use a real email address. Also, your From: line on the overall mail was botched.

I'd suggest using 'git send-email --to="youremail@xxxxxxxxxxx" ...', as a way to validate that the mail you sent to yourself shows up with a valid email address (both in the envelope and in the body of the commit), prior to sending to the list.

In the meantime, am I correct that you meant to use this address?

lvroyce AT linux.vnet.ibm.com


URI alias always do prefix matching,because we count length of entry according to config file entry, which should be the given alias' length.

It's okay to wrap commit messages; typically, wrapping at 70 or so bytes is nice.

e.g.:
/etc/libvirt/libvirt.conf
uri_aliases = [
   "hail=qemu:///system",
   "sleet=qemu+ssh://root@9.115.122.57/system",
   "sam=qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock",
]

when issue "virsh -c hailly" it will match "hail=qemu:///system"

Signed-off-by: Wen Ruo Lv<lvroyce@lvroyce-ThinkPad-T420.(none)>

Again evidence of the misconfiguration. You'll want to 'git commit --amend' this.

---
  src/libvirt.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index e9d1a29..54e283f 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1022,7 +1022,7 @@ virConnectOpenFindURIAliasMatch(virConfValuePtr value, const char *alias, char *
              return -1;
          }

-        if (STREQLEN(entry->str, alias, offset-entry->str)) {
+        if (STREQLEN(entry->str, alias, strlen(alias))) {

At any rate, this looks correct. So, I'll apply it once you resend a v2 with fixed email configuration.

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]