The phyp_driver.h file has various declarations that are only ever used from phyp_driver.c, so they should be in the .c file only. --- src/phyp/phyp_driver.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ src/phyp/phyp_driver.h | 53 -------------------------------------------------- 2 files changed, 49 insertions(+), 53 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index a56f25d..caab499 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -41,6 +41,7 @@ #include <fcntl.h> #include <domain_event.h> #include <poll.h> +#include <libssh2.h> #include "internal.h" #include "virauth.h" @@ -63,6 +64,54 @@ VIR_LOG_INIT("phyp.phyp_driver"); +# define LPAR_EXEC_ERR -1 +# define SSH_CONN_ERR -2 /* error while trying to connect to remote host */ +# define SSH_CMD_ERR -3 /* error while trying to execute the remote cmd */ + +typedef struct _ConnectionData ConnectionData; +typedef ConnectionData *ConnectionDataPtr; +struct _ConnectionData { + LIBSSH2_SESSION *session; + int sock; +}; + +/* This is the lpar (domain) struct that relates + * the ID with UUID generated by the API + * */ +typedef struct _lpar lpar_t; +typedef lpar_t *lparPtr; +struct _lpar { + unsigned char uuid[VIR_UUID_BUFLEN]; + int id; +}; + +/* Struct that holds how many lpars (domains) we're + * handling and a pointer to an array of lpar structs + * */ +typedef struct _uuid_table uuid_table_t; +typedef uuid_table_t *uuid_tablePtr; +struct _uuid_table { + size_t nlpars; + lparPtr *lpars; +}; + +/* This is the main structure of the driver + * */ +typedef struct _phyp_driver phyp_driver_t; +typedef phyp_driver_t *phyp_driverPtr; +struct _phyp_driver { + uuid_tablePtr uuid_table; + virCapsPtr caps; + virDomainXMLOptionPtr xmlopt; + int vios_id; + + /* system_type: + * 0 = hmc + * 127 = ivm + * */ + int system_type; + char *managed_system; +}; /* * URI: phyp://user@[hmc|ivm]/managed_system diff --git a/src/phyp/phyp_driver.h b/src/phyp/phyp_driver.h index a5e7369..a82aafd 100644 --- a/src/phyp/phyp_driver.h +++ b/src/phyp/phyp_driver.h @@ -25,59 +25,6 @@ #ifndef PHYP_DRIVER_H # define PHYP_DRIVER_H -# include "conf/capabilities.h" -# include "conf/domain_conf.h" -# include <libssh2.h> - -# define LPAR_EXEC_ERR -1 -# define SSH_CONN_ERR -2 /* error while trying to connect to remote host */ -# define SSH_CMD_ERR -3 /* error while trying to execute the remote cmd */ - -typedef struct _ConnectionData ConnectionData; -typedef ConnectionData *ConnectionDataPtr; -struct _ConnectionData { - LIBSSH2_SESSION *session; - int sock; -}; - -/* This is the lpar (domain) struct that relates - * the ID with UUID generated by the API - * */ -typedef struct _lpar lpar_t; -typedef lpar_t *lparPtr; -struct _lpar { - unsigned char uuid[VIR_UUID_BUFLEN]; - int id; -}; - -/* Struct that holds how many lpars (domains) we're - * handling and a pointer to an array of lpar structs - * */ -typedef struct _uuid_table uuid_table_t; -typedef uuid_table_t *uuid_tablePtr; -struct _uuid_table { - size_t nlpars; - lparPtr *lpars; -}; - -/* This is the main structure of the driver - * */ -typedef struct _phyp_driver phyp_driver_t; -typedef phyp_driver_t *phyp_driverPtr; -struct _phyp_driver { - uuid_tablePtr uuid_table; - virCapsPtr caps; - virDomainXMLOptionPtr xmlopt; - int vios_id; - - /* system_type: - * 0 = hmc - * 127 = ivm - * */ - int system_type; - char *managed_system; -}; - int phypRegister(void); #endif /* PHYP_DRIVER_H */ -- 2.1.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list