Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
3811eaaa
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3811eaaa
编写于
11月 05, 2009
作者:
E
Eduardo Otubo
提交者:
Daniel Veillard
11月 05, 2009
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
POWER add create() and destroy() support
* src/phyp/phyp_driver.[ch]: add new entry points and a number of cleanups
上级
3023ec5e
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
946 addition
and
265 deletion
+946
-265
src/phyp/phyp_driver.c
src/phyp/phyp_driver.c
+875
-254
src/phyp/phyp_driver.h
src/phyp/phyp_driver.h
+71
-11
未找到文件。
src/phyp/phyp_driver.c
浏览文件 @
3811eaaa
此差异已折叠。
点击以展开。
src/phyp/phyp_driver.h
浏览文件 @
3811eaaa
/*
* Copyright IBM Corp. 2009
*
* phyp_driver.c: ssh layer to access Power Hypervisors
*
* Authors:
* Eduardo Otubo <otubo at linux.vnet.ibm.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "conf/capabilities.h"
#include "conf/domain_conf.h"
#include <config.h>
#include <libssh2.h>
...
...
@@ -26,22 +52,53 @@ struct _lpar {
/* Struct that holds how many lpars (domains) we're
* handling and a pointer to an array of lpar structs
* */
typedef
struct
_uuid_
db
uuid_db
_t
;
typedef
uuid_
db_t
*
uuid_db
Ptr
;
struct
_uuid_
db
{
typedef
struct
_uuid_
table
uuid_table
_t
;
typedef
uuid_
table_t
*
uuid_table
Ptr
;
struct
_uuid_
table
{
int
nlpars
;
lparPtr
*
lpars
;
};
int
phypGetLparUUID
(
unsigned
char
*
uuid
,
int
lpar_id
,
virConnectPtr
conn
);
/* 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
;
int
vios_id
;
char
*
managed_system
;
};
void
init_uuid_db
(
virConnectPtr
conn
);
int
phypCheckSPFreeSapce
(
virConnectPtr
conn
,
int
required_size
,
char
*
sp
);
int
phypRegister
(
void
);
int
phypGetVIOSPartitionID
(
virConnectPtr
conn
);
virCapsPtr
phypCapsInit
(
void
);
int
phypBuildLpar
(
virConnectPtr
conn
,
virDomainDefPtr
def
);
int
phypUUIDTable_WriteFile
(
virConnectPtr
conn
);
int
phypUUIDTable_ReadFile
(
virConnectPtr
conn
);
int
phypUUIDTable_AddLpar
(
virConnectPtr
conn
,
unsigned
char
*
uuid
,
int
id
);
int
phypUUIDTable_RemLpar
(
virConnectPtr
conn
,
int
id
);
void
stripPath
(
char
*
striped_path
,
char
*
path
);
int
phypUUIDTable_Pull
(
virConnectPtr
conn
);
void
stripNewline
(
char
*
striped_string
,
char
*
string
);
int
phypUUIDTable_Push
(
virConnectPtr
conn
);
int
phypUUIDTable_Init
(
virConnectPtr
conn
);
int
escape_specialcharacters
(
char
*
src
,
char
*
dst
,
size_t
dstlen
);
int
waitsocket
(
int
socket_fd
,
LIBSSH2_SESSION
*
session
);
int
phypGetLparUUID
(
unsigned
char
*
uuid
,
int
lpar_id
,
virConnectPtr
conn
);
int
phypRegister
(
void
);
int
phypGetLparState
(
virConnectPtr
conn
,
unsigned
int
lpar_id
);
...
...
@@ -52,6 +109,10 @@ unsigned long phypGetLparMem(virConnectPtr conn,
unsigned
long
phypGetLparCPU
(
virConnectPtr
conn
,
const
char
*
managed_system
,
int
lpar_id
);
unsigned
long
phypGetLparCPUGeneric
(
virConnectPtr
conn
,
const
char
*
managed_system
,
int
lpar_id
,
int
type
);
int
phypGetRemoteSlot
(
virConnectPtr
conn
,
const
char
*
managed_system
,
const
char
*
lpar_name
);
...
...
@@ -60,6 +121,5 @@ char *phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
int
phypDiskType
(
virConnectPtr
conn
,
char
*
backing_device
);
LIBSSH2_SESSION
*
openSSHSession
(
virConnectPtr
conn
,
virConnectAuthPtr
auth
,
int
*
internal_socket
);
int
waitsocket
(
int
socket_fd
,
LIBSSH2_SESSION
*
session
);
LIBSSH2_SESSION
*
openSSHSession
(
virConnectPtr
conn
,
virConnectAuthPtr
auth
,
int
*
internal_socket
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录