]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Move phyp internal info out of the header file
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 23 Oct 2014 13:46:25 +0000 (14:46 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 7 Nov 2014 10:12:50 +0000 (11:12 +0100)
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
src/phyp/phyp_driver.h

index 09617c8fe530d2ed743373b22de73da412aac2ab..b39b97cc91ff421b8f3b7dfa9db2f59ade31d4c4 100644 (file)
 
 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
index a5e736936930e05467682944353241b61e1b0a92..a82aafd64932d3765cafe8016efffd4d485394fc 100644 (file)
 #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 */