perl: Fix another place where qw() was used as parentheses.
[libguestfs.git] / fish / reopen.c
index 1b162c1..959cd2c 100644 (file)
@@ -26,7 +26,7 @@
 #include "fish.h"
 
 int
-run_reopen (const char *cmd, int argc, char *argv[])
+run_reopen (const char *cmd, size_t argc, char *argv[])
 {
   guestfs_h *g2;
   int r;
@@ -66,8 +66,13 @@ run_reopen (const char *cmd, int argc, char *argv[])
   if (p)
     guestfs_set_path (g2, p);
 
+  r = guestfs_get_pgroup (g);
+  if (r >= 0)
+    guestfs_set_pgroup (g2, r);
+
   if (progress_bars)
-    guestfs_set_progress_callback (g2, progress_callback, NULL);
+    guestfs_set_event_callback (g2, progress_callback,
+                                GUESTFS_EVENT_PROGRESS, 0, NULL);
 
   /* Close the original handle. */
   guestfs_close (g);