Move phyp internal info out of the header file

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.
This commit is contained in:
Daniel P. Berrange 2014-10-23 14:46:25 +01:00
parent 63c3c5399b
commit a9dedd781b
2 changed files with 48 additions and 53 deletions

View File

@ -63,6 +63,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

View File

@ -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 */