Merge branch 'master' of git+ssh://192.168.122.1/home/rjones/d/libguestfs
[libguestfs.git] / src / guestfs.c
index 2d4db66..c3bce0b 100644 (file)
@@ -708,7 +708,7 @@ guestfs_add_drive (guestfs_h *g, const char *filename)
   }
 
   /* cache=off improves reliability in the event of a host crash. */
-  snprintf (buf, len, "file=%s,cache=off,if=virtio", filename);
+  snprintf (buf, len, "file=%s,cache=off,if=%s", filename, DRIVE_IF);
 
   return guestfs_config (g, "-drive", buf);
 }
@@ -729,7 +729,7 @@ guestfs_add_drive_ro (guestfs_h *g, const char *filename)
     return -1;
   }
 
-  snprintf (buf, len, "file=%s,snapshot=on,if=virtio", filename);
+  snprintf (buf, len, "file=%s,snapshot=on,if=%s", filename, DRIVE_IF);
 
   return guestfs_config (g, "-drive", buf);
 }
@@ -1473,6 +1473,13 @@ guestfs_free_lvm_lv_list (struct guestfs_lvm_lv_list *x)
   free (x);
 }
 
+void
+guestfs_free_dirent_list (struct guestfs_dirent_list *x)
+{
+  xdr_free ((xdrproc_t) xdr_guestfs_int_dirent_list, (char *) x);
+  free (x);
+}
+
 /* We don't know if stdout_event or sock_read_event will be the
  * first to receive EOF if the qemu process dies.  This function
  * has the common cleanup code for both.