提交 a9dedd78 编写于 作者: D Daniel P. Berrange

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.
上级 63c3c539
......@@ -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
......
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册