Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
caa805ea
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看板
提交
caa805ea
编写于
2月 09, 2010
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove passing of virConnectPtr throughout QEMU driver
上级
d47ef780
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
1026 addition
and
1065 deletion
+1026
-1065
src/qemu/qemu_conf.c
src/qemu/qemu_conf.c
+228
-243
src/qemu/qemu_conf.h
src/qemu/qemu_conf.h
+8
-13
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+554
-573
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+19
-19
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+100
-100
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.c
+116
-116
tests/qemuargv2xmltest.c
tests/qemuargv2xmltest.c
+1
-1
未找到文件。
src/qemu/qemu_conf.c
浏览文件 @
caa805ea
此差异已折叠。
点击以展开。
src/qemu/qemu_conf.h
浏览文件 @
caa805ea
...
...
@@ -157,9 +157,9 @@ typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
/* Config type for XML import/export conversions */
#define QEMU_CONFIG_FORMAT_ARGV "qemu-argv"
#define qemu
dReportError(conn, dom, net, code, fmt...)
\
virReportErrorHelper(conn, VIR_FROM_QEMU, code, __FILE__,
\
__FUNCTION__, __LINE__, fmt)
#define qemu
ReportError(code, fmt...)
\
virReportErrorHelper(NULL, VIR_FROM_QEMU, code, __FILE__,
\
__FUNCTION__, __LINE__, fmt)
int
qemudLoadDriverConfig
(
struct
qemud_driver
*
driver
,
...
...
@@ -191,15 +191,13 @@ int qemudBuildCommandLine (virConnectPtr conn,
const
char
*
migrateFrom
);
/* With vlan == -1, use netdev syntax, else old hostnet */
char
*
qemuBuildHostNetStr
(
virConnectPtr
conn
,
virDomainNetDefPtr
net
,
char
*
qemuBuildHostNetStr
(
virDomainNetDefPtr
net
,
char
type_sep
,
int
vlan
,
const
char
*
tapfd
);
/* Legacy, pre device support */
char
*
qemuBuildNicStr
(
virConnectPtr
conn
,
virDomainNetDefPtr
net
,
char
*
qemuBuildNicStr
(
virDomainNetDefPtr
net
,
const
char
*
prefix
,
int
vlan
);
...
...
@@ -213,8 +211,7 @@ char *qemuBuildDriveStr(virDomainDiskDefPtr disk,
int
qemuCmdFlags
);
/* Current, best practice */
char
*
qemuBuildDriveDevStr
(
virConnectPtr
conn
,
virDomainDiskDefPtr
disk
);
char
*
qemuBuildDriveDevStr
(
virDomainDiskDefPtr
disk
);
/* Current, best practice */
char
*
qemuBuildControllerDevStr
(
virDomainControllerDefPtr
def
);
...
...
@@ -258,12 +255,10 @@ int qemudProbeCPUModels (const char *qemu,
int
qemudCanonicalizeMachine
(
struct
qemud_driver
*
driver
,
virDomainDefPtr
def
);
virDomainDefPtr
qemuParseCommandLine
(
virConnectPtr
conn
,
virCapsPtr
caps
,
virDomainDefPtr
qemuParseCommandLine
(
virCapsPtr
caps
,
const
char
**
progenv
,
const
char
**
progargv
);
virDomainDefPtr
qemuParseCommandLineString
(
virConnectPtr
conn
,
virCapsPtr
caps
,
virDomainDefPtr
qemuParseCommandLineString
(
virCapsPtr
caps
,
const
char
*
args
);
qemuDomainPCIAddressSetPtr
qemuDomainPCIAddressSetCreate
(
virDomainDefPtr
def
);
...
...
src/qemu/qemu_driver.c
浏览文件 @
caa805ea
此差异已折叠。
点击以展开。
src/qemu/qemu_monitor.c
浏览文件 @
caa805ea
...
...
@@ -240,8 +240,8 @@ qemuMonitorOpenUnix(const char *monitor)
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sun_family
=
AF_UNIX
;
if
(
virStrcpyStatic
(
addr
.
sun_path
,
monitor
)
==
NULL
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"Monitor path %s too big for destination"
),
monitor
);
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Monitor path %s too big for destination"
),
monitor
);
goto
error
;
}
...
...
@@ -282,8 +282,8 @@ qemuMonitorOpenPty(const char *monitor)
int
monfd
;
if
((
monfd
=
open
(
monitor
,
O_RDWR
))
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"Unable to open monitor path %s"
),
monitor
);
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Unable to open monitor path %s"
),
monitor
);
return
-
1
;
}
...
...
@@ -569,8 +569,8 @@ qemuMonitorOpen(virDomainObjPtr vm,
qemuMonitorPtr
mon
;
if
(
!
cb
||
!
cb
->
eofNotify
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"EOF notify callback must be supplied"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"EOF notify callback must be supplied"
));
return
NULL
;
}
...
...
@@ -580,14 +580,14 @@ qemuMonitorOpen(virDomainObjPtr vm,
}
if
(
virMutexInit
(
&
mon
->
lock
)
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot initialize monitor mutex"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot initialize monitor mutex"
));
VIR_FREE
(
mon
);
return
NULL
;
}
if
(
virCondInit
(
&
mon
->
notify
)
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot initialize monitor condition"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot initialize monitor condition"
));
virMutexDestroy
(
&
mon
->
lock
);
VIR_FREE
(
mon
);
return
NULL
;
...
...
@@ -610,22 +610,22 @@ qemuMonitorOpen(virDomainObjPtr vm,
break
;
default:
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"unable to handle monitor type: %s"
),
virDomainChrTypeToString
(
config
->
type
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"unable to handle monitor type: %s"
),
virDomainChrTypeToString
(
config
->
type
));
goto
cleanup
;
}
if
(
mon
->
fd
==
-
1
)
goto
cleanup
;
if
(
virSetCloseExec
(
mon
->
fd
)
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to set monitor close-on-exec flag"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to set monitor close-on-exec flag"
));
goto
cleanup
;
}
if
(
virSetNonBlock
(
mon
->
fd
)
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to put monitor into non-blocking mode"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to put monitor into non-blocking mode"
));
goto
cleanup
;
}
...
...
@@ -636,8 +636,8 @@ qemuMonitorOpen(virDomainObjPtr vm,
VIR_EVENT_HANDLE_READABLE
,
qemuMonitorIO
,
mon
,
NULL
))
<
0
)
{
qemu
dReportError
(
NULL
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unable to register monitor events"
));
qemu
ReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unable to register monitor events"
));
goto
cleanup
;
}
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
caa805ea
此差异已折叠。
点击以展开。
src/qemu/qemu_monitor_text.c
浏览文件 @
caa805ea
此差异已折叠。
点击以展开。
tests/qemuargv2xmltest.c
浏览文件 @
caa805ea
...
...
@@ -49,7 +49,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
if
(
virtTestLoadFile
(
xml
,
&
expectxml
,
MAX_FILE
)
<
0
)
goto
fail
;
if
(
!
(
vmdef
=
qemuParseCommandLineString
(
NULL
,
driver
.
caps
,
cmd
)))
if
(
!
(
vmdef
=
qemuParseCommandLineString
(
driver
.
caps
,
cmd
)))
goto
fail
;
if
(
!
(
actualxml
=
virDomainDefFormat
(
NULL
,
vmdef
,
0
)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录