From bf00be0e17c03f46075b3276fade7bd23d380557 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 23 Jul 2012 19:03:08 +0100 Subject: launch: Make get-pid and max-disks APIs into virtual methods of the current attach-method. --- src/launch-libvirt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/launch-libvirt.c') 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, }; -- cgit