Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
39b4f4aa
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看板
提交
39b4f4aa
编写于
3月 10, 2011
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Rename qemuMonitorCommand{,WithFd} as qemuMonitorHMP*
So that it's obvious that they are supposed to be used with HMP commands.
上级
266265a5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
53 addition
and
53 deletion
+53
-53
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+4
-4
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor.h
+6
-6
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.c
+43
-43
未找到文件。
src/qemu/qemu_monitor.c
浏览文件 @
39b4f4aa
...
@@ -742,10 +742,10 @@ cleanup:
...
@@ -742,10 +742,10 @@ cleanup:
}
}
int
qemuMonitorCommandWithFd
(
qemuMonitorPtr
mon
,
int
qemuMonitor
HMP
CommandWithFd
(
qemuMonitorPtr
mon
,
const
char
*
cmd
,
const
char
*
cmd
,
int
scm_fd
,
int
scm_fd
,
char
**
reply
)
char
**
reply
)
{
{
if
(
mon
->
json
)
if
(
mon
->
json
)
return
qemuMonitorJSONHumanCommandWithFd
(
mon
,
cmd
,
scm_fd
,
reply
);
return
qemuMonitorJSONHumanCommandWithFd
(
mon
,
cmd
,
scm_fd
,
reply
);
...
...
src/qemu/qemu_monitor.h
浏览文件 @
39b4f4aa
...
@@ -136,12 +136,12 @@ int qemuMonitorUnref(qemuMonitorPtr mon);
...
@@ -136,12 +136,12 @@ int qemuMonitorUnref(qemuMonitorPtr mon);
/* These APIs are for use by the internal Text/JSON monitor impl code only */
/* These APIs are for use by the internal Text/JSON monitor impl code only */
int
qemuMonitorSend
(
qemuMonitorPtr
mon
,
int
qemuMonitorSend
(
qemuMonitorPtr
mon
,
qemuMonitorMessagePtr
msg
);
qemuMonitorMessagePtr
msg
);
int
qemuMonitorCommandWithFd
(
qemuMonitorPtr
mon
,
int
qemuMonitor
HMP
CommandWithFd
(
qemuMonitorPtr
mon
,
const
char
*
cmd
,
const
char
*
cmd
,
int
scm_fd
,
int
scm_fd
,
char
**
reply
);
char
**
reply
);
# define qemuMonitorCommand(mon, cmd, reply) \
# define qemuMonitor
HMP
Command(mon, cmd, reply) \
qemuMonitorCommandWithFd(mon, cmd, -1, reply)
qemuMonitor
HMP
CommandWithFd(mon, cmd, -1, reply)
/* XXX same comment about virConnectPtr as above */
/* XXX same comment about virConnectPtr as above */
int
qemuMonitorGetDiskSecret
(
qemuMonitorPtr
mon
,
int
qemuMonitorGetDiskSecret
(
qemuMonitorPtr
mon
,
...
...
src/qemu/qemu_monitor_text.c
浏览文件 @
39b4f4aa
...
@@ -360,7 +360,7 @@ int
...
@@ -360,7 +360,7 @@ int
qemuMonitorTextStopCPUs
(
qemuMonitorPtr
mon
)
{
qemuMonitorTextStopCPUs
(
qemuMonitorPtr
mon
)
{
char
*
info
;
char
*
info
;
if
(
qemuMonitorCommand
(
mon
,
"stop"
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"stop"
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"cannot stop CPU execution"
));
"%s"
,
_
(
"cannot stop CPU execution"
));
return
-
1
;
return
-
1
;
...
@@ -373,7 +373,7 @@ qemuMonitorTextStopCPUs(qemuMonitorPtr mon) {
...
@@ -373,7 +373,7 @@ qemuMonitorTextStopCPUs(qemuMonitorPtr mon) {
int
qemuMonitorTextSystemPowerdown
(
qemuMonitorPtr
mon
)
{
int
qemuMonitorTextSystemPowerdown
(
qemuMonitorPtr
mon
)
{
char
*
info
;
char
*
info
;
if
(
qemuMonitorCommand
(
mon
,
"system_powerdown"
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"system_powerdown"
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"system shutdown operation failed"
));
"%s"
,
_
(
"system shutdown operation failed"
));
return
-
1
;
return
-
1
;
...
@@ -392,7 +392,7 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
...
@@ -392,7 +392,7 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
pid_t
*
cpupids
=
NULL
;
pid_t
*
cpupids
=
NULL
;
size_t
ncpupids
=
0
;
size_t
ncpupids
=
0
;
if
(
qemuMonitorCommand
(
mon
,
"info cpus"
,
&
qemucpus
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info cpus"
,
&
qemucpus
)
<
0
)
{
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot run monitor command to fetch CPU thread info"
));
"%s"
,
_
(
"cannot run monitor command to fetch CPU thread info"
));
return
-
1
;
return
-
1
;
...
@@ -544,7 +544,7 @@ int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
...
@@ -544,7 +544,7 @@ int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
int
ret
=
-
1
;
int
ret
=
-
1
;
char
*
offset
;
char
*
offset
;
if
(
qemuMonitorCommand
(
mon
,
"info balloon"
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info balloon"
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not query memory balloon allocation"
));
"%s"
,
_
(
"could not query memory balloon allocation"
));
return
-
1
;
return
-
1
;
...
@@ -581,7 +581,7 @@ int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon,
...
@@ -581,7 +581,7 @@ int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon,
int
ret
=
0
;
int
ret
=
0
;
char
*
offset
;
char
*
offset
;
if
(
qemuMonitorCommand
(
mon
,
"info balloon"
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info balloon"
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not query memory balloon statistics"
));
"%s"
,
_
(
"could not query memory balloon statistics"
));
return
-
1
;
return
-
1
;
...
@@ -613,7 +613,7 @@ int qemuMonitorTextGetBlockStatsInfo(qemuMonitorPtr mon,
...
@@ -613,7 +613,7 @@ int qemuMonitorTextGetBlockStatsInfo(qemuMonitorPtr mon,
const
char
*
p
,
*
eol
;
const
char
*
p
,
*
eol
;
int
devnamelen
=
strlen
(
devname
);
int
devnamelen
=
strlen
(
devname
);
if
(
qemuMonitorCommand
(
mon
,
"info blockstats"
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info blockstats"
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"'info blockstats' command failed"
));
"%s"
,
_
(
"'info blockstats' command failed"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -778,7 +778,7 @@ int qemuMonitorTextSetPassword(qemuMonitorPtr mon,
...
@@ -778,7 +778,7 @@ int qemuMonitorTextSetPassword(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"setting password failed"
));
"%s"
,
_
(
"setting password failed"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -812,7 +812,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
...
@@ -812,7 +812,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"expiring password failed"
));
"%s"
,
_
(
"expiring password failed"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -851,7 +851,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
...
@@ -851,7 +851,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not balloon memory allocation"
));
"%s"
,
_
(
"could not balloon memory allocation"
));
VIR_FREE
(
cmd
);
VIR_FREE
(
cmd
);
...
@@ -888,7 +888,7 @@ int qemuMonitorTextSetCPU(qemuMonitorPtr mon, int cpu, int online)
...
@@ -888,7 +888,7 @@ int qemuMonitorTextSetCPU(qemuMonitorPtr mon, int cpu, int online)
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not change CPU online status"
));
"%s"
,
_
(
"could not change CPU online status"
));
VIR_FREE
(
cmd
);
VIR_FREE
(
cmd
);
...
@@ -923,7 +923,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
...
@@ -923,7 +923,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"could not eject media on %s"
),
devname
);
_
(
"could not eject media on %s"
),
devname
);
goto
cleanup
;
goto
cleanup
;
...
@@ -967,7 +967,7 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
...
@@ -967,7 +967,7 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"could not change media on %s"
),
devname
);
_
(
"could not change media on %s"
),
devname
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1019,7 +1019,7 @@ static int qemuMonitorTextSaveMemory(qemuMonitorPtr mon,
...
@@ -1019,7 +1019,7 @@ static int qemuMonitorTextSaveMemory(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"could not save memory region to '%s'"
),
path
);
_
(
"could not save memory region to '%s'"
),
path
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1066,7 +1066,7 @@ int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
...
@@ -1066,7 +1066,7 @@ int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not restrict migration speed"
));
"%s"
,
_
(
"could not restrict migration speed"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1093,7 +1093,7 @@ int qemuMonitorTextSetMigrationDowntime(qemuMonitorPtr mon,
...
@@ -1093,7 +1093,7 @@ int qemuMonitorTextSetMigrationDowntime(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"could not set maximum migration downtime"
));
"%s"
,
_
(
"could not set maximum migration downtime"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1128,7 +1128,7 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
...
@@ -1128,7 +1128,7 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
*
remaining
=
0
;
*
remaining
=
0
;
*
total
=
0
;
*
total
=
0
;
if
(
qemuMonitorCommand
(
mon
,
"info migrate"
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info migrate"
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"cannot query migration status"
));
"%s"
,
_
(
"cannot query migration status"
));
return
-
1
;
return
-
1
;
...
@@ -1234,7 +1234,7 @@ static int qemuMonitorTextMigrate(qemuMonitorPtr mon,
...
@@ -1234,7 +1234,7 @@ static int qemuMonitorTextMigrate(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"unable to start migration to %s"
),
dest
);
_
(
"unable to start migration to %s"
),
dest
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1384,7 +1384,7 @@ int qemuMonitorTextMigrateCancel(qemuMonitorPtr mon)
...
@@ -1384,7 +1384,7 @@ int qemuMonitorTextMigrateCancel(qemuMonitorPtr mon)
{
{
char
*
info
=
NULL
;
char
*
info
=
NULL
;
if
(
qemuMonitorCommand
(
mon
,
"migrate_cancel"
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"migrate_cancel"
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot run monitor command to cancel migration"
));
"%s"
,
_
(
"cannot run monitor command to cancel migration"
));
return
-
1
;
return
-
1
;
...
@@ -1413,7 +1413,7 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
...
@@ -1413,7 +1413,7 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
info
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
info
)
<
0
)
{
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
qemuReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"cannot run monitor command to add usb disk"
));
"%s"
,
_
(
"cannot run monitor command to add usb disk"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1449,7 +1449,7 @@ static int qemuMonitorTextAddUSBDevice(qemuMonitorPtr mon,
...
@@ -1449,7 +1449,7 @@ static int qemuMonitorTextAddUSBDevice(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"cannot attach usb device"
));
"%s"
,
_
(
"cannot attach usb device"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1590,7 +1590,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
...
@@ -1590,7 +1590,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"cannot attach host pci device"
));
"%s"
,
_
(
"cannot attach host pci device"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1641,7 +1641,7 @@ try_command:
...
@@ -1641,7 +1641,7 @@ try_command:
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"cannot attach %s disk %s"
),
bus
,
path
);
_
(
"cannot attach %s disk %s"
),
bus
,
path
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1683,7 +1683,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
...
@@ -1683,7 +1683,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to add NIC with '%s'"
),
cmd
);
_
(
"failed to add NIC with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1727,7 +1727,7 @@ try_command:
...
@@ -1727,7 +1727,7 @@ try_command:
}
}
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"failed to remove PCI device"
));
"%s"
,
_
(
"failed to remove PCI device"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -1775,7 +1775,7 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
...
@@ -1775,7 +1775,7 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommandWithFd
(
mon
,
cmd
,
fd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
CommandWithFd
(
mon
,
cmd
,
fd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to pass fd to qemu with '%s'"
),
cmd
);
_
(
"failed to pass fd to qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1818,7 +1818,7 @@ int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
...
@@ -1818,7 +1818,7 @@ int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1854,7 +1854,7 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
...
@@ -1854,7 +1854,7 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to add host net with '%s'"
),
cmd
);
_
(
"failed to add host net with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1889,7 +1889,7 @@ int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
...
@@ -1889,7 +1889,7 @@ int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to remove host network in qemu with '%s'"
),
cmd
);
_
(
"failed to remove host network in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1918,7 +1918,7 @@ int qemuMonitorTextAddNetdev(qemuMonitorPtr mon,
...
@@ -1918,7 +1918,7 @@ int qemuMonitorTextAddNetdev(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to add netdev with '%s'"
),
cmd
);
_
(
"failed to add netdev with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1947,7 +1947,7 @@ int qemuMonitorTextRemoveNetdev(qemuMonitorPtr mon,
...
@@ -1947,7 +1947,7 @@ int qemuMonitorTextRemoveNetdev(qemuMonitorPtr mon,
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to remove netdev in qemu with '%s'"
),
cmd
);
_
(
"failed to remove netdev in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -1982,7 +1982,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
...
@@ -1982,7 +1982,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
char
*
reply
=
NULL
;
char
*
reply
=
NULL
;
int
ret
=
-
1
;
int
ret
=
-
1
;
if
(
qemuMonitorCommand
(
mon
,
"info chardev"
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info chardev"
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"failed to retrieve chardev info in qemu with 'info chardev'"
));
_
(
"failed to retrieve chardev info in qemu with 'info chardev'"
));
goto
cleanup
;
goto
cleanup
;
...
@@ -2067,7 +2067,7 @@ try_command:
...
@@ -2067,7 +2067,7 @@ try_command:
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"cannot attach %s disk controller"
),
bus
);
_
(
"cannot attach %s disk controller"
),
bus
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2166,7 +2166,7 @@ try_command:
...
@@ -2166,7 +2166,7 @@ try_command:
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2257,7 +2257,7 @@ int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
...
@@ -2257,7 +2257,7 @@ int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
*
retaddrs
=
NULL
;
*
retaddrs
=
NULL
;
if
(
qemuMonitorCommand
(
mon
,
"info pci"
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
"info pci"
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"cannot query PCI addresses"
));
"%s"
,
_
(
"cannot query PCI addresses"
));
return
-
1
;
return
-
1
;
...
@@ -2350,7 +2350,7 @@ int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
...
@@ -2350,7 +2350,7 @@ int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
}
}
VIR_DEBUG
(
"TextDelDevice devalias=%s"
,
devalias
);
VIR_DEBUG
(
"TextDelDevice devalias=%s"
,
devalias
);
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"cannot detach %s device"
),
devalias
);
_
(
"cannot detach %s device"
),
devalias
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2390,7 +2390,7 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
...
@@ -2390,7 +2390,7 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"cannot attach %s device"
),
devicestr
);
_
(
"cannot attach %s device"
),
devicestr
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2435,7 +2435,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
...
@@ -2435,7 +2435,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2483,7 +2483,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
...
@@ -2483,7 +2483,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"cannot delete %s drive"
),
drivestr
);
_
(
"cannot delete %s drive"
),
drivestr
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2537,7 +2537,7 @@ int qemuMonitorTextSetDrivePassphrase(qemuMonitorPtr mon,
...
@@ -2537,7 +2537,7 @@ int qemuMonitorTextSetDrivePassphrase(qemuMonitorPtr mon,
goto
cleanup
;
goto
cleanup
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
)
<
0
)
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
_
(
"failed to close fd in qemu with '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2573,7 +2573,7 @@ int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char *name)
...
@@ -2573,7 +2573,7 @@ int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char *name)
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
))
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
))
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to take snapshot using command '%s'"
),
cmd
);
_
(
"failed to take snapshot using command '%s'"
),
cmd
);
goto
cleanup
;
goto
cleanup
;
...
@@ -2618,7 +2618,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
...
@@ -2618,7 +2618,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
))
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
))
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to restore snapshot using command '%s'"
),
_
(
"failed to restore snapshot using command '%s'"
),
cmd
);
cmd
);
...
@@ -2673,7 +2673,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name)
...
@@ -2673,7 +2673,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name)
virReportOOMError
();
virReportOOMError
();
return
-
1
;
return
-
1
;
}
}
if
(
qemuMonitorCommand
(
mon
,
cmd
,
&
reply
))
{
if
(
qemuMonitor
HMP
Command
(
mon
,
cmd
,
&
reply
))
{
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to delete snapshot using command '%s'"
),
_
(
"failed to delete snapshot using command '%s'"
),
cmd
);
cmd
);
...
@@ -2714,7 +2714,7 @@ int qemuMonitorTextArbitraryCommand(qemuMonitorPtr mon, const char *cmd,
...
@@ -2714,7 +2714,7 @@ int qemuMonitorTextArbitraryCommand(qemuMonitorPtr mon, const char *cmd,
return
-
1
;
return
-
1
;
}
}
ret
=
qemuMonitorCommand
(
mon
,
safecmd
,
reply
);
ret
=
qemuMonitor
HMP
Command
(
mon
,
safecmd
,
reply
);
if
(
ret
!=
0
)
if
(
ret
!=
0
)
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
qemuReportError
(
VIR_ERR_OPERATION_FAILED
,
_
(
"failed to run cmd '%s'"
),
safecmd
);
_
(
"failed to run cmd '%s'"
),
safecmd
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录