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

Re: [libvirt] [PATCH 0/4] Allow changing guest XML during QEMU migration



On Fri, May 27, 2011 at 01:09:06PM +0100, Daniel P. Berrange wrote:
> This patch series updates the QEMU driver to allow it to take
> advantage of the migration v3 protocol support for changing
> guest XML during migration.
> 
> eg
> 
> virsh migrate --xml migtest.xml migtest qemu+ssh://somehost/system
> 
> NB the XML is strictly validated for guest ABI compatibility
> so only things like host NIC device names or host disk file
> paths can be changed

This series caused a build failure on Win32 due to some dodgy
#ifdef conditionals, so I pushed this followup

commit ef983dfe5ab9c8b126d435f3f3a46bdd6f8f21b6
Author: Daniel P. Berrange <berrange redhat com>
Date:   Tue May 31 14:12:33 2011 +0100

    Fix sysinfo/virsh build problems on Win32
    
    The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32
    conditional.
    
    The existing virSysinfoFormat is also stubbed out on Win32, even
    though the code works without any trouble. This breaks XML output
    on Win32, so the stub is removed.
    
    virsh migrate mistakenly had some variables inside the conditional
    
    * src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove
      Win32 stub for virSysinfoFormat
    * tools/virsh.c: Fix variable declaration on Win32

diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c
index ff07151..40ec2e3 100644
--- a/src/util/sysinfo.c
+++ b/src/util/sysinfo.c
@@ -94,15 +94,6 @@ virSysinfoRead(void) {
     return NULL;
 }
 
-char *
-virSysinfoFormat(virSysinfoDefPtr def ATTRIBUTE_UNUSED,
-                 const char *prefix ATTRIBUTE_UNUSED)
-{
-    virReportSystemError(ENOSYS, "%s",
-                 _("Host sysinfo extraction not supported on this platform"));
-    return NULL;
-}
-
 #else /* !WIN32 */
 
 virSysinfoDefPtr
@@ -220,6 +211,7 @@ no_memory:
     ret = NULL;
     goto cleanup;
 }
+#endif /* !WIN32 */
 
 /**
  * virSysinfoFormat:
@@ -350,7 +342,7 @@ bool virSysinfoIsEqual(virSysinfoDefPtr src,
         goto cleanup;
     }
 
-# define CHECK_FIELD(name, desc)                                        \
+#define CHECK_FIELD(name, desc)                                         \
     do {                                                                \
         if (STRNEQ_NULLABLE(src->name, dst->name)) {                    \
             virSmbiosReportError(VIR_ERR_CONFIG_UNSUPPORTED,            \
@@ -372,12 +364,10 @@ bool virSysinfoIsEqual(virSysinfoDefPtr src,
     CHECK_FIELD(system_sku, "system sku");
     CHECK_FIELD(system_family, "system family");
 
-# undef CHECK_FIELD
+#undef CHECK_FIELD
 
     identical = true;
 
 cleanup:
     return identical;
 }
-
-#endif /* !WIN32 */
diff --git a/tools/virsh.c b/tools/virsh.c
index 520d16e..dfd5bd2 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -3850,10 +3850,10 @@ doMigrate (void *opaque)
     vshCtrlData *data = opaque;
     vshControl *ctl = data->ctl;
     const vshCmd *cmd = data->cmd;
-#if HAVE_PTHREAD_SIGMASK
-    sigset_t sigmask, oldsigmask;
     const char *xmlfile = NULL;
     char *xml = NULL;
+#if HAVE_PTHREAD_SIGMASK
+    sigset_t sigmask, oldsigmask;
 
     sigemptyset(&sigmask);
     sigaddset(&sigmask, SIGINT);


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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