That is, for versions older than 4.0. Also do not try to include headers for those old versions. --- src/vbox/vbox_common.h | 10 +--------- src/vbox/vbox_storage.c | 10 +--------- src/vbox/vbox_uniformed_api.h | 4 ---- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/vbox/vbox_common.h b/src/vbox/vbox_common.h index e29a7bd..7bbab8d 100644 --- a/src/vbox/vbox_common.h +++ b/src/vbox/vbox_common.h @@ -410,15 +410,7 @@ typedef nsISupports IKeyboard; # define installUniformedAPI(gVBoxAPI, result) \ do { \ result = 0; \ - if (uVersion >= 2001052 && uVersion < 2002051) { \ - vbox22InstallUniformedAPI(&gVBoxAPI); \ - } else if (uVersion >= 2002051 && uVersion < 3000051) { \ - vbox30InstallUniformedAPI(&gVBoxAPI); \ - } else if (uVersion >= 3000051 && uVersion < 3001051) { \ - vbox31InstallUniformedAPI(&gVBoxAPI); \ - } else if (uVersion >= 3001051 && uVersion < 3002051) { \ - vbox32InstallUniformedAPI(&gVBoxAPI); \ - } else if (uVersion >= 3002051 && uVersion < 4000051) { \ + if (uVersion >= 3002051 && uVersion < 4000051) { \ vbox40InstallUniformedAPI(&gVBoxAPI); \ } else if (uVersion >= 4000051 && uVersion < 4001051) { \ vbox41InstallUniformedAPI(&gVBoxAPI); \ diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c index 27d38ad..c286753 100644 --- a/src/vbox/vbox_storage.c +++ b/src/vbox/vbox_storage.c @@ -888,15 +888,7 @@ virStorageDriverPtr vboxGetStorageDriver(uint32_t uVersion) /* Install gVBoxAPI according to the vbox API version. * Return -1 for unsupported version. */ - if (uVersion >= 2001052 && uVersion < 2002051) { - vbox22InstallUniformedAPI(&gVBoxAPI); - } else if (uVersion >= 2002051 && uVersion < 3000051) { - vbox30InstallUniformedAPI(&gVBoxAPI); - } else if (uVersion >= 3000051 && uVersion < 3001051) { - vbox31InstallUniformedAPI(&gVBoxAPI); - } else if (uVersion >= 3001051 && uVersion < 3002051) { - vbox32InstallUniformedAPI(&gVBoxAPI); - } else if (uVersion >= 3002051 && uVersion < 4000051) { + if (uVersion >= 3002051 && uVersion < 4000051) { vbox40InstallUniformedAPI(&gVBoxAPI); } else if (uVersion >= 4000051 && uVersion < 4001051) { vbox41InstallUniformedAPI(&gVBoxAPI); diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 6a8b6bc..3b2b7a8 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -616,10 +616,6 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid); /* Version specified functions for installing uniformed API */ -void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -void vbox30InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -void vbox31InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -void vbox32InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox40InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox41InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox42InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -- 2.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list