[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1

Richard W.M. Jones rjones at redhat.com
Sat Jun 1 11:04:28 UTC 2013


The following commit has been merged in the experimental branch:
commit 76950a0e8de277c7b51645fc36a7dd902852b126
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed May 1 09:33:51 2013 +0100

    tests/c-api: Warn about deprecated functions in main program.
    
    And replace deprecated guestfs_set_close_callback with
    non-deprecated guestfs_set_event_callback.

diff --git a/tests/c-api/tests-main.c b/tests/c-api/tests-main.c
index ec27b0f..984fa0b 100644
--- a/tests/c-api/tests-main.c
+++ b/tests/c-api/tests-main.c
@@ -28,6 +28,11 @@
 
 #include <pcre.h>
 
+/* Warn about deprecated libguestfs functions, but only in this file,
+ * not in 'tests.c' (because we want to test deprecated functions).
+ */
+#define GUESTFS_WARN_DEPRECATED 1
+
 #include "guestfs.h"
 #include "guestfs-internal-frontend.h"
 
@@ -160,7 +165,8 @@ print_strings (char *const *argv)
 }
 
 static void
-incr (guestfs_h *g, void *iv)
+incr (guestfs_h *g, void *iv, uint64_t event, int eh, int flags,
+      const char *buf, size_t buf_len, const uint64_t *array, size_t array_len)
 {
   int *i = (int *) iv;
   (*i)++;
@@ -527,7 +533,7 @@ main (int argc, char *argv[])
   nr_failed = perform_tests ();
 
   /* Check close callback is called. */
-  guestfs_set_close_callback (g, incr, &close_sentinel);
+  guestfs_set_event_callback (g, incr, GUESTFS_EVENT_CLOSE, 0, &close_sentinel);
 
   guestfs_close (g);
 

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list