lib/launch-libvirt.c: Don't store libvirt_version in handle

We no longer use the libvirt version anywhere, except when reporting
the version.  Remove this from the handle.

Simplify the remaining code.  In particular:

* don't bother parsing the libvirt version, just print what
  virGetVersion gives us

* guestfs_int_version_from_libvirt is dead code, so it can be removed
This commit is contained in:
Richard W.M. Jones
2025-09-29 13:20:36 +01:00
committed by rwmjones
parent 48bad58024
commit d8b08eac38
3 changed files with 2 additions and 16 deletions

View File

@@ -124,7 +124,6 @@ struct backend_libvirt_data {
bool selinux_norelabel_disks;
char name[DOMAIN_NAME_LEN]; /* random name */
bool is_kvm; /* false = qemu, true = kvm (from capabilities)*/
struct version libvirt_version; /* libvirt version */
struct secret *secrets; /* list of secrets */
size_t nr_secrets;
char *uefi_code; /* UEFI (firmware) code and variables. */
@@ -341,12 +340,8 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
}
virGetVersion (&version_number, NULL, NULL);
guestfs_int_version_from_libvirt (&data->libvirt_version, version_number);
debug (g, "libvirt version = %lu (%d.%d.%d)",
version_number,
data->libvirt_version.v_major,
data->libvirt_version.v_minor,
data->libvirt_version.v_micro);
debug (g, "libvirt version = %lu", version_number);
guestfs_int_launch_send_progress (g, 0);
/* Create a random name for the guest. */