Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
f24150b1
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,发现更多精彩内容 >>
提交
f24150b1
编写于
10月 08, 2013
作者:
P
Peter Krempa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: hostdev: Fix function spacing and header formatting
上级
a863b890
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
42 addition
and
18 deletion
+42
-18
src/qemu/qemu_hostdev.c
src/qemu/qemu_hostdev.c
+42
-18
未找到文件。
src/qemu/qemu_hostdev.c
浏览文件 @
f24150b1
...
...
@@ -85,6 +85,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
return
list
;
}
/*
* qemuGetActivePciHostDeviceList - make a new list with a *copy* of
* every virPCIDevice object that is found on the activePciHostdevs
...
...
@@ -128,7 +129,9 @@ qemuGetActivePciHostDeviceList(virQEMUDriverPtr driver,
return
list
;
}
int
qemuUpdateActivePciHostdevs
(
virQEMUDriverPtr
driver
,
int
qemuUpdateActivePciHostdevs
(
virQEMUDriverPtr
driver
,
virDomainDefPtr
def
)
{
virDomainHostdevDefPtr
hostdev
=
NULL
;
...
...
@@ -188,6 +191,7 @@ cleanup:
return
ret
;
}
int
qemuUpdateActiveUsbHostdevs
(
virQEMUDriverPtr
driver
,
virDomainDefPtr
def
)
...
...
@@ -274,8 +278,10 @@ cleanup:
return
ret
;
}
static
int
qemuDomainHostdevPciSysfsPath
(
virDomainHostdevDefPtr
hostdev
,
char
**
sysfs_path
)
qemuDomainHostdevPciSysfsPath
(
virDomainHostdevDefPtr
hostdev
,
char
**
sysfs_path
)
{
virPCIDeviceAddress
config_address
;
...
...
@@ -287,6 +293,7 @@ qemuDomainHostdevPciSysfsPath(virDomainHostdevDefPtr hostdev, char **sysfs_path)
return
virPCIDeviceAddressGetSysfsFile
(
&
config_address
,
sysfs_path
);
}
int
qemuDomainHostdevIsVirtualFunction
(
virDomainHostdevDefPtr
hostdev
)
{
...
...
@@ -303,6 +310,7 @@ qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev)
return
ret
;
}
static
int
qemuDomainHostdevNetDevice
(
virDomainHostdevDefPtr
hostdev
,
char
**
linkdev
,
int
*
vf
)
...
...
@@ -331,6 +339,7 @@ cleanup:
return
ret
;
}
static
int
qemuDomainHostdevNetConfigVirtPortProfile
(
const
char
*
linkdev
,
int
vf
,
virNetDevVPortProfilePtr
virtPort
,
...
...
@@ -370,6 +379,7 @@ qemuDomainHostdevNetConfigVirtPortProfile(const char *linkdev, int vf,
return
ret
;
}
int
qemuDomainHostdevNetConfigReplace
(
virDomainHostdevDefPtr
hostdev
,
const
unsigned
char
*
uuid
,
...
...
@@ -438,6 +448,7 @@ cleanup:
return
ret
;
}
int
qemuDomainHostdevNetConfigRestore
(
virDomainHostdevDefPtr
hostdev
,
char
*
stateDir
)
...
...
@@ -474,7 +485,9 @@ qemuDomainHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
return
ret
;
}
int
qemuPrepareHostdevPCIDevices
(
virQEMUDriverPtr
driver
,
int
qemuPrepareHostdevPCIDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
const
unsigned
char
*
uuid
,
virDomainHostdevDefPtr
*
hostdevs
,
...
...
@@ -670,6 +683,7 @@ cleanup:
return
ret
;
}
int
qemuPrepareHostdevUSBDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
...
...
@@ -722,6 +736,7 @@ error:
return
-
1
;
}
int
qemuFindHostdevUSBDevice
(
virDomainHostdevDefPtr
hostdev
,
bool
mandatory
,
...
...
@@ -809,6 +824,7 @@ out:
return
0
;
}
static
int
qemuPrepareHostUSBDevices
(
virQEMUDriverPtr
driver
,
virDomainDefPtr
def
,
...
...
@@ -878,6 +894,7 @@ cleanup:
return
ret
;
}
int
qemuPrepareHostdevSCSIDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
...
...
@@ -996,7 +1013,9 @@ cleanup:
return
-
1
;
}
int
qemuPrepareHostDevices
(
virQEMUDriverPtr
driver
,
int
qemuPrepareHostDevices
(
virQEMUDriverPtr
driver
,
virDomainDefPtr
def
,
bool
coldBoot
)
{
...
...
@@ -1022,7 +1041,8 @@ int qemuPrepareHostDevices(virQEMUDriverPtr driver,
* Pre-condition: driver->inactivePciHostdevs & driver->activePciHostdevs
* are locked
*/
void
qemuReattachPciDevice
(
virPCIDevicePtr
dev
,
virQEMUDriverPtr
driver
)
void
qemuReattachPciDevice
(
virPCIDevicePtr
dev
,
virQEMUDriverPtr
driver
)
{
int
retries
=
100
;
...
...
@@ -1052,7 +1072,8 @@ void qemuReattachPciDevice(virPCIDevicePtr dev, virQEMUDriverPtr driver)
}
void
qemuDomainReAttachHostdevDevices
(
virQEMUDriverPtr
driver
,
void
qemuDomainReAttachHostdevDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
virDomainHostdevDefPtr
*
hostdevs
,
int
nhostdevs
)
...
...
@@ -1140,6 +1161,7 @@ cleanup:
virObjectUnref
(
cfg
);
}
static
void
qemuDomainReAttachHostUsbDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
...
...
@@ -1203,6 +1225,7 @@ qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
virObjectUnlock
(
driver
->
activeUsbHostdevs
);
}
void
qemuDomainReAttachHostScsiDevices
(
virQEMUDriverPtr
driver
,
const
char
*
name
,
...
...
@@ -1272,7 +1295,8 @@ qemuDomainReAttachHostScsiDevices(virQEMUDriverPtr driver,
virObjectUnlock
(
driver
->
activeScsiHostdevs
);
}
void
qemuDomainReAttachHostDevices
(
virQEMUDriverPtr
driver
,
void
qemuDomainReAttachHostDevices
(
virQEMUDriverPtr
driver
,
virDomainDefPtr
def
)
{
if
(
!
def
->
nhostdevs
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录