summaryrefslogtreecommitdiffstats
path: root/src/launch-libvirt.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-23 19:03:08 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-23 20:17:25 +0100
commitbf00be0e17c03f46075b3276fade7bd23d380557 (patch)
tree1b1850bed2af08b2975bcb8dd5163c79a0d328b2 /src/launch-libvirt.c
parent3614d76b37ee8ef90f5a280e1bb51bccd87eaadb (diff)
downloadlibguestfs-bf00be0e17c03f46075b3276fade7bd23d380557.tar.gz
libguestfs-bf00be0e17c03f46075b3276fade7bd23d380557.tar.xz
libguestfs-bf00be0e17c03f46075b3276fade7bd23d380557.zip
launch: Make get-pid and max-disks APIs into virtual methods of the current attach-method.
Diffstat (limited to 'src/launch-libvirt.c')
-rw-r--r--src/launch-libvirt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index bebdcfb1..7c3d189a 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1193,6 +1193,13 @@ libvirt_error (guestfs_h *g, const char *fs, ...)
free (msg);
}
+/* This backend assumes virtio-scsi is available. */
+static int
+max_disks_libvirt (guestfs_h *g)
+{
+ return 255;
+}
+
#else /* no libvirt or libxml2 at compile time */
#define NOT_IMPL(r) \
@@ -1211,9 +1218,16 @@ shutdown_libvirt (guestfs_h *g)
NOT_IMPL (-1);
}
+static int
+max_disks_libvirt (guestfs_h *g)
+{
+ NOT_IMPL (-1);
+}
+
#endif /* no libvirt or libxml2 at compile time */
struct attach_ops attach_ops_libvirt = {
.launch = launch_libvirt,
.shutdown = shutdown_libvirt,
+ .max_disks = max_disks_libvirt,
};