bhyve: Fix the build

After 1036ddadb2 we use bhyveDriverGetCapabilities from other
sources too, not only from bhyve_driver.c. However, the function
was static so not properly expose to other files. In order to
expose it, we need to move couple of #include-s too.
Then, there has been a copy paste error in
virBhyveProcessReconnect: s/privconn/data->driver/.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-02-05 22:36:42 +01:00
parent e117bf642b
commit 5147f4f3a3
3 changed files with 8 additions and 4 deletions

View File

@ -30,7 +30,6 @@
#include "datatypes.h" #include "datatypes.h"
#include "virbuffer.h" #include "virbuffer.h"
#include "viruuid.h" #include "viruuid.h"
#include "capabilities.h"
#include "configmake.h" #include "configmake.h"
#include "viralloc.h" #include "viralloc.h"
#include "network_conf.h" #include "network_conf.h"
@ -58,7 +57,6 @@
#include "bhyve_command.h" #include "bhyve_command.h"
#include "bhyve_domain.h" #include "bhyve_domain.h"
#include "bhyve_process.h" #include "bhyve_process.h"
#include "bhyve_utils.h"
#include "bhyve_capabilities.h" #include "bhyve_capabilities.h"
#define VIR_FROM_THIS VIR_FROM_BHYVE #define VIR_FROM_THIS VIR_FROM_BHYVE
@ -127,7 +125,7 @@ bhyveAutostartDomains(bhyveConnPtr driver)
* *
* Returns: a reference to a virCapsPtr instance or NULL * Returns: a reference to a virCapsPtr instance or NULL
*/ */
static virCapsPtr ATTRIBUTE_NONNULL(1) virCapsPtr ATTRIBUTE_NONNULL(1)
bhyveDriverGetCapabilities(bhyveConnPtr driver) bhyveDriverGetCapabilities(bhyveConnPtr driver)
{ {

View File

@ -23,10 +23,15 @@
#ifndef __BHYVE_DRIVER_H__ #ifndef __BHYVE_DRIVER_H__
# define __BHYVE_DRIVER_H__ # define __BHYVE_DRIVER_H__
#include "capabilities.h"
#include "bhyve_utils.h"
int bhyveRegister(void); int bhyveRegister(void);
unsigned bhyveDriverGetCaps(virConnectPtr conn); unsigned bhyveDriverGetCaps(virConnectPtr conn);
unsigned bhyveDriverGetGrubCaps(virConnectPtr conn); unsigned bhyveDriverGetGrubCaps(virConnectPtr conn);
virCapsPtr bhyveDriverGetCapabilities(bhyveConnPtr driver);
#endif /* __BHYVE_DRIVER_H__ */ #endif /* __BHYVE_DRIVER_H__ */

View File

@ -32,6 +32,7 @@
#include <net/if_tap.h> #include <net/if_tap.h>
#include "bhyve_device.h" #include "bhyve_device.h"
#include "bhyve_driver.h"
#include "bhyve_command.h" #include "bhyve_command.h"
#include "bhyve_monitor.h" #include "bhyve_monitor.h"
#include "bhyve_process.h" #include "bhyve_process.h"
@ -375,7 +376,7 @@ virBhyveProcessReconnect(virDomainObjPtr vm,
if (!vm->pid) if (!vm->pid)
return 0; return 0;
caps = bhyveDriverGetCapabilities(privconn); caps = bhyveDriverGetCapabilities(data->driver);
if (!caps) if (!caps)
return -1; return -1;