Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b1d5f6c6
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b1d5f6c6
编写于
3月 18, 2014
作者:
M
Martin Kletzander
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use K&R style for curly braces in src/qemu/
Signed-off-by:
N
Martin Kletzander
<
mkletzan@redhat.com
>
上级
9c487f65
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
90 addition
and
44 deletion
+90
-44
src/qemu/qemu_agent.c
src/qemu/qemu_agent.c
+3
-2
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+4
-2
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+63
-31
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+2
-1
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+2
-1
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+2
-1
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.c
+14
-6
未找到文件。
src/qemu/qemu_agent.c
浏览文件 @
b1d5f6c6
/*
* qemu_agent.c: interaction with QEMU guest agent
*
* Copyright (C) 2006-201
3
Red Hat, Inc.
* Copyright (C) 2006-201
4
Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
...
...
@@ -574,7 +574,8 @@ static void qemuAgentUpdateWatch(qemuAgentPtr mon)
static
void
qemuAgentIO
(
int
watch
,
int
fd
,
int
events
,
void
*
opaque
)
{
qemuAgentIO
(
int
watch
,
int
fd
,
int
events
,
void
*
opaque
)
{
qemuAgentPtr
mon
=
opaque
;
bool
error
=
false
;
bool
eof
=
false
;
...
...
src/qemu/qemu_command.c
浏览文件 @
b1d5f6c6
...
...
@@ -1871,7 +1871,8 @@ cleanup:
}
static
bool
qemuDomainSupportsPCI
(
virDomainDefPtr
def
)
{
qemuDomainSupportsPCI
(
virDomainDefPtr
def
)
{
if
((
def
->
os
.
arch
!=
VIR_ARCH_ARMV7L
)
&&
(
def
->
os
.
arch
!=
VIR_ARCH_AARCH64
))
return
true
;
...
...
@@ -11197,7 +11198,8 @@ error:
static
void
qemuParseCommandLineBootDevs
(
virDomainDefPtr
def
,
const
char
*
str
)
{
qemuParseCommandLineBootDevs
(
virDomainDefPtr
def
,
const
char
*
str
)
{
int
n
,
b
=
0
;
for
(
n
=
0
;
str
[
n
]
&&
b
<
VIR_DOMAIN_BOOT_LAST
;
n
++
)
{
...
...
src/qemu/qemu_driver.c
浏览文件 @
b1d5f6c6
...
...
@@ -172,9 +172,11 @@ virQEMUDriverPtr qemu_driver = NULL;
static void
qemuVMDriverLock(void) {}
qemuVMDriverLock(void)
{}
static void
qemuVMDriverUnlock(void) {}
qemuVMDriverUnlock(void)
{}
static int
qemuVMFilterRebuild(virDomainObjListIterator iter, void *data)
...
...
@@ -879,7 +881,8 @@ static void qemuNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
* files and update its state and the networking
*/
static int
qemuStateReload(void) {
qemuStateReload(void)
{
virQEMUDriverConfigPtr cfg = NULL;
virCapsPtr caps = NULL;
...
...
@@ -910,7 +913,8 @@ cleanup:
*
*/
static int
qemuStateStop(void) {
qemuStateStop(void)
{
int ret = -1;
virConnectPtr conn;
int numDomains = 0;
...
...
@@ -967,7 +971,8 @@ qemuStateStop(void) {
* Shutdown the QEmu daemon, it will stop all active domains and networks
*/
static int
qemuStateCleanup(void) {
qemuStateCleanup(void)
{
if (!qemu_driver)
return -1;
...
...
@@ -1145,7 +1150,8 @@ static int qemuConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
kvmGetMaxVCPUs(void) {
kvmGetMaxVCPUs(void)
{
int fd;
int ret;
...
...
@@ -1201,7 +1207,9 @@ qemuConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
return virBufferContentAndReset(&buf);
}
static int qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
static int
qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type)
{
if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
return -1;
...
...
@@ -1321,7 +1329,8 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss,
static virDomainPtr qemuDomainLookupByID(virConnectPtr conn,
int id) {
int id)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainObjPtr vm;
virDomainPtr dom = NULL;
...
...
@@ -1347,7 +1356,8 @@ cleanup:
}
static virDomainPtr qemuDomainLookupByUUID(virConnectPtr conn,
const unsigned char *uuid) {
const unsigned char *uuid)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainObjPtr vm;
virDomainPtr dom = NULL;
...
...
@@ -1375,7 +1385,8 @@ cleanup:
}
static virDomainPtr qemuDomainLookupByName(virConnectPtr conn,
const char *name) {
const char *name)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainObjPtr vm;
virDomainPtr dom = NULL;
...
...
@@ -1458,7 +1469,8 @@ cleanup:
return ret;
}
static int qemuConnectGetVersion(virConnectPtr conn, unsigned long *version) {
static int qemuConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
virQEMUDriverPtr driver = conn->privateData;
int ret = -1;
unsigned int qemuVersion = 0;
...
...
@@ -1493,7 +1505,8 @@ static char *qemuConnectGetHostname(virConnectPtr conn)
}
static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids) {
static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids)
{
virQEMUDriverPtr driver = conn->privateData;
int n;
...
...
@@ -1506,7 +1519,8 @@ static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids) {
return n;
}
static int qemuConnectNumOfDomains(virConnectPtr conn) {
static int qemuConnectNumOfDomains(virConnectPtr conn)
{
virQEMUDriverPtr driver = conn->privateData;
int n;
...
...
@@ -1542,7 +1556,8 @@ qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
const char *xml,
unsigned int flags) {
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
virDomainObjPtr vm = NULL;
...
...
@@ -1648,7 +1663,8 @@ cleanup:
}
static int qemuDomainSuspend(virDomainPtr dom) {
static int qemuDomainSuspend(virDomainPtr dom)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
...
...
@@ -1729,7 +1745,8 @@ cleanup:
}
static int qemuDomainResume(virDomainPtr dom) {
static int qemuDomainResume(virDomainPtr dom)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
...
...
@@ -1793,7 +1810,8 @@ cleanup:
return ret;
}
static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags) {
static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
...
...
@@ -2155,7 +2173,8 @@ cleanup:
}
static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
unsigned int flags) {
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
qemuDomainObjPrivatePtr priv;
virDomainObjPtr vm;
...
...
@@ -2652,7 +2671,8 @@ struct _virQEMUSaveHeader {
};
static inline void
bswap_header(virQEMUSaveHeaderPtr hdr) {
bswap_header(virQEMUSaveHeaderPtr hdr)
{
hdr->version = bswap_32(hdr->version);
hdr->xml_len = bswap_32(hdr->xml_len);
hdr->was_running = bswap_32(hdr->was_running);
...
...
@@ -4248,7 +4268,8 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
unsigned int vcpu,
unsigned char *cpumap,
int maplen,
unsigned int flags) {
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
...
...
@@ -4424,7 +4445,8 @@ static int
qemuDomainPinVcpu(virDomainPtr dom,
unsigned int vcpu,
unsigned char *cpumap,
int maplen) {
int maplen)
{
return qemuDomainPinVcpuFlags(dom, vcpu, cpumap, maplen,
VIR_DOMAIN_AFFECT_LIVE);
}
...
...
@@ -4434,7 +4456,8 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom,
int ncpumaps,
unsigned char *cpumaps,
int maplen,
unsigned int flags) {
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm = NULL;
...
...
@@ -4758,7 +4781,8 @@ qemuDomainGetVcpus(virDomainPtr dom,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen) {
int maplen)
{
virDomainObjPtr vm;
size_t i;
int v, maxcpu, hostcpus;
...
...
@@ -5951,7 +5975,8 @@ cleanup:
return ret;
}
static int qemuConnectNumOfDefinedDomains(virConnectPtr conn) {
static int qemuConnectNumOfDefinedDomains(virConnectPtr conn)
{
virQEMUDriverPtr driver = conn->privateData;
int ret = -1;
...
...
@@ -6099,7 +6124,8 @@ qemuDomainCreate(virDomainPtr dom)
return qemuDomainCreateWithFlags(dom, 0);
}
static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml) {
static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
virDomainDefPtr oldDef = NULL;
...
...
@@ -7289,7 +7315,8 @@ static int qemuDomainDetachDevice(virDomainPtr dom, const char *xml)
}
static int qemuDomainGetAutostart(virDomainPtr dom,
int *autostart) {
int *autostart)
{
virDomainObjPtr vm;
int ret = -1;
...
...
@@ -7309,7 +7336,8 @@ cleanup:
}
static int qemuDomainSetAutostart(virDomainPtr dom,
int autostart) {
int autostart)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
char *configFile = NULL, *autostartLink = NULL;
...
...
@@ -11447,7 +11475,8 @@ cleanup:
static int qemuDomainGetJobInfo(virDomainPtr dom,
virDomainJobInfoPtr info) {
virDomainJobInfoPtr info)
{
virDomainObjPtr vm;
int ret = -1;
qemuDomainObjPrivatePtr priv;
...
...
@@ -11634,7 +11663,8 @@ cleanup:
}
static int qemuDomainAbortJob(virDomainPtr dom) {
static int qemuDomainAbortJob(virDomainPtr dom)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
...
...
@@ -12006,7 +12036,8 @@ cleanup:
static int
qemuDomainSnapshotFSFreeze(virDomainObjPtr vm) {
qemuDomainSnapshotFSFreeze(virDomainObjPtr vm)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
int freezed;
...
...
@@ -16711,7 +16742,8 @@ static virStateDriver qemuStateDriver = {
.stateStop = qemuStateStop,
};
int qemuRegister(void) {
int qemuRegister(void)
{
if (virRegisterDriver(&qemuDriver) < 0)
return -1;
if (virRegisterStateDriver(&qemuStateDriver) < 0)
...
...
src/qemu/qemu_migration.c
浏览文件 @
b1d5f6c6
...
...
@@ -4340,7 +4340,8 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
}
static
int
qemuMigrationVPAssociatePortProfiles
(
virDomainDefPtr
def
)
{
qemuMigrationVPAssociatePortProfiles
(
virDomainDefPtr
def
)
{
size_t
i
;
int
last_good_net
=
-
1
;
virDomainNetDefPtr
net
;
...
...
src/qemu/qemu_monitor.c
浏览文件 @
b1d5f6c6
...
...
@@ -597,7 +597,8 @@ static void qemuMonitorUpdateWatch(qemuMonitorPtr mon)
static
void
qemuMonitorIO
(
int
watch
,
int
fd
,
int
events
,
void
*
opaque
)
{
qemuMonitorIO
(
int
watch
,
int
fd
,
int
events
,
void
*
opaque
)
{
qemuMonitorPtr
mon
=
opaque
;
bool
error
=
false
;
bool
eof
=
false
;
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
b1d5f6c6
...
...
@@ -294,7 +294,8 @@ cleanup:
static
int
qemuMonitorJSONCommand
(
qemuMonitorPtr
mon
,
virJSONValuePtr
cmd
,
virJSONValuePtr
*
reply
)
{
virJSONValuePtr
*
reply
)
{
return
qemuMonitorJSONCommandWithFd
(
mon
,
cmd
,
-
1
,
reply
);
}
...
...
src/qemu/qemu_monitor_text.c
浏览文件 @
b1d5f6c6
/*
* qemu_monitor_text.c: interaction with QEMU monitor console
*
* Copyright (C) 2006-201
3
Red Hat, Inc.
* Copyright (C) 2006-201
4
Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
...
...
@@ -364,7 +364,8 @@ qemuMonitorSendDiskPassphrase(qemuMonitorPtr mon,
int
qemuMonitorTextStartCPUs
(
qemuMonitorPtr
mon
,
virConnectPtr
conn
)
{
virConnectPtr
conn
)
{
char
*
reply
;
if
(
qemuMonitorTextCommandWithHandler
(
mon
,
"cont"
,
...
...
@@ -379,7 +380,8 @@ qemuMonitorTextStartCPUs(qemuMonitorPtr mon,
int
qemuMonitorTextStopCPUs
(
qemuMonitorPtr
mon
)
{
qemuMonitorTextStopCPUs
(
qemuMonitorPtr
mon
)
{
char
*
info
;
int
ret
;
...
...
@@ -434,7 +436,8 @@ cleanup:
}
int
qemuMonitorTextSystemPowerdown
(
qemuMonitorPtr
mon
)
{
int
qemuMonitorTextSystemPowerdown
(
qemuMonitorPtr
mon
)
{
char
*
info
;
int
ret
;
...
...
@@ -444,7 +447,11 @@ int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon) {
return
ret
;
}
int
qemuMonitorTextSetLink
(
qemuMonitorPtr
mon
,
const
char
*
name
,
enum
virDomainNetInterfaceLinkState
state
)
{
int
qemuMonitorTextSetLink
(
qemuMonitorPtr
mon
,
const
char
*
name
,
enum
virDomainNetInterfaceLinkState
state
)
{
char
*
info
=
NULL
;
char
*
cmd
=
NULL
;
const
char
*
st_str
=
NULL
;
...
...
@@ -486,7 +493,8 @@ error:
return
-
1
;
}
int
qemuMonitorTextSystemReset
(
qemuMonitorPtr
mon
)
{
int
qemuMonitorTextSystemReset
(
qemuMonitorPtr
mon
)
{
char
*
info
;
int
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录