[Libvir] [PATCH] virsh version

Hi, Currently virsh version is not work. Currently just show the libvirt version only. This is caused by mis-matching of xen(xen_unified.c) and Xen(libvirt.c) . I do not know the policy. So I attached 2 Pattern. Thanks Atsushi SAKAI =================Pattern1================ --- libvirt.orig/src/xen_unified.c 2007-04-13 09:43:57.000000000 +0900 +++ libvirt.Xen/src/xen_unified.c 2007-04-13 20:02:46.000000000 +0900 @@ -89,8 +89,8 @@ xenUnifiedOpen (virConnectPtr conn, cons /* If name == NULL, name == "", or begins with "xen", then it's for us. */ if (!name || name[0] == '\0') - name = "xen"; - if (strncasecmp (name, "xen", 3) != 0) + name = "Xen"; + if (strncasecmp (name, "Xen", 3) != 0) return VIR_DRV_OPEN_DECLINED; /* Allocate per-connection private data. */ @@ -719,7 +719,7 @@ xenUnifiedDomainSetAutostart (virDomainP /* The interface which we export upwards to libvirt.c. */ static virDriver xenUnifiedDriver = { .no = VIR_DRV_XEN_UNIFIED, - .name = "xen", + .name = "Xen", .ver = VERSION, .open = xenUnifiedOpen, .close = xenUnifiedClose, =================Pattern2================ --- libvirt.orig/src/libvirt.c 2007-04-12 23:18:39.000000000 +0900 +++ libvirt.Xen/src/libvirt.c 2007-04-13 20:09:02.000000000 +0900 @@ -246,7 +246,7 @@ virGetVersion(unsigned long *libVer, con if (typeVer != NULL) { if (type == NULL) - type = "Xen"; + type = "xen"; for (i = 0;i < virDriverTabCount;i++) { if ((virDriverTab[i] != NULL) && (!strcmp(virDriverTab[i]->name, type))) {

On Fri, Apr 13, 2007 at 08:15:50PM +0900, Atsushi SAKAI wrote:
Hi,
Currently virsh version is not work. Currently just show the libvirt version only.
This is caused by mis-matching of xen(xen_unified.c) and Xen(libvirt.c) .
I do not know the policy. So I attached 2 Pattern.
Thanks Atsushi SAKAI
=================Pattern1================ --- libvirt.orig/src/xen_unified.c 2007-04-13 09:43:57.000000000 +0900 +++ libvirt.Xen/src/xen_unified.c 2007-04-13 20:02:46.000000000 +0900 @@ -89,8 +89,8 @@ xenUnifiedOpen (virConnectPtr conn, cons
/* If name == NULL, name == "", or begins with "xen", then it's for us. */ if (!name || name[0] == '\0') - name = "xen"; - if (strncasecmp (name, "xen", 3) != 0) + name = "Xen"; + if (strncasecmp (name, "Xen", 3) != 0) return VIR_DRV_OPEN_DECLINED;
/* Allocate per-connection private data. */ @@ -719,7 +719,7 @@ xenUnifiedDomainSetAutostart (virDomainP /* The interface which we export upwards to libvirt.c. */ static virDriver xenUnifiedDriver = { .no = VIR_DRV_XEN_UNIFIED, - .name = "xen", + .name = "Xen", .ver = VERSION, .open = xenUnifiedOpen, .close = xenUnifiedClose,
I think we want this impl, since that appears to be closer to what the old behaviour was. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (2)
-
Atsushi SAKAI
-
Daniel P. Berrange