• J
    qemu: Change return type of virQEMUCapsFetchCPUDefinitions · a94f67ee
    Jiri Denemark 提交于
    The function would return a valid virDomainCapsCPUModelsPtr with empty
    CPU models list if query-cpu-definitions exists in QEMU, but returns
    GenericError meaning it's not in fact implemented. This behaviour is a
    bit strange especially after such virDomainCapsCPUModels structure is
    stored in capabilities XML and parsed back, which will result in NULL
    virDomainCapsCPUModelsPtr rather than a structure containing nothing.
    
    Let's just keep virDomainCapsCPUModelsPtr NULL if the QMP command is not
    implemented and change the return value to int so that callers can
    easily check for failure or success.
    Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
    Reviewed-by: NJán Tomko <jtomko@redhat.com>
    a94f67ee
qemu_process.c 260.6 KB