mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virQEMUCapsInitGuestFromBinary: Remove return value
The function always returns 0. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6481b06a19
commit
a4c03bdd59
@ -1004,9 +1004,8 @@ virQEMUCapsInitGuest(virCaps *caps,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = virQEMUCapsInitGuestFromBinary(caps,
|
virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, guestarch);
|
||||||
binary, qemuCaps,
|
ret = 0;
|
||||||
guestarch);
|
|
||||||
|
|
||||||
VIR_FREE(binary);
|
VIR_FREE(binary);
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
@ -1096,7 +1095,7 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
void
|
||||||
virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
||||||
const char *binary,
|
const char *binary,
|
||||||
virQEMUCaps *qemuCaps,
|
virQEMUCaps *qemuCaps,
|
||||||
@ -1107,7 +1106,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
|||||||
size_t nmachines = 0;
|
size_t nmachines = 0;
|
||||||
|
|
||||||
if (!binary)
|
if (!binary)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines);
|
virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines);
|
||||||
|
|
||||||
@ -1150,8 +1149,6 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
|||||||
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_PAE);
|
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_PAE);
|
||||||
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_NONPAE);
|
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_NONPAE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -819,10 +819,10 @@ bool virQEMUCapsSupportsGICVersion(virQEMUCaps *qemuCaps,
|
|||||||
const char *virQEMUCapsGetPreferredMachine(virQEMUCaps *qemuCaps,
|
const char *virQEMUCapsGetPreferredMachine(virQEMUCaps *qemuCaps,
|
||||||
virDomainVirtType virtType);
|
virDomainVirtType virtType);
|
||||||
|
|
||||||
int virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
void virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
||||||
const char *binary,
|
const char *binary,
|
||||||
virQEMUCaps *qemuCaps,
|
virQEMUCaps *qemuCaps,
|
||||||
virArch guestarch);
|
virArch guestarch);
|
||||||
|
|
||||||
int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
|
int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
|
||||||
virArch hostarch,
|
virArch hostarch,
|
||||||
|
@ -102,13 +102,7 @@ testGetCaps(char *capsData, const testQemuData *data)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virQEMUCapsInitGuestFromBinary(caps,
|
virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, arch);
|
||||||
binary,
|
|
||||||
qemuCaps,
|
|
||||||
arch) < 0) {
|
|
||||||
fprintf(stderr, "failed to create the capabilities from qemu");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return g_steal_pointer(&caps);
|
return g_steal_pointer(&caps);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user