Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
0f79480b
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,发现更多精彩内容 >>
提交
0f79480b
编写于
6月 24, 2016
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace some uses STREQLEN with STRPREFIX
Do not call it with a magic constant matching the length of the pattern.
上级
13c34f81
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+1
-1
src/storage/storage_backend_iscsi.c
src/storage/storage_backend_iscsi.c
+1
-1
src/storage/storage_backend_scsi.c
src/storage/storage_backend_scsi.c
+1
-1
src/xen/xen_hypervisor.c
src/xen/xen_hypervisor.c
+2
-2
未找到文件。
src/qemu/qemu_command.c
浏览文件 @
0f79480b
...
...
@@ -3610,7 +3610,7 @@ qemuBuildMemballoonCommandLine(virCommandPtr cmd,
{
virBuffer
buf
=
VIR_BUFFER_INITIALIZER
;
if
(
STR
EQLEN
(
def
->
os
.
machine
,
"s390-virtio"
,
10
)
&&
if
(
STR
PREFIX
(
def
->
os
.
machine
,
"s390-virtio"
)
&&
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_VIRTIO_S390
)
&&
def
->
memballoon
)
def
->
memballoon
->
model
=
VIR_DOMAIN_MEMBALLOON_MODEL_NONE
;
...
...
src/storage/storage_backend_iscsi.c
浏览文件 @
0f79480b
...
...
@@ -106,7 +106,7 @@ virStorageBackendISCSIGetHostNumber(const char *sysfs_path,
}
while
((
direrr
=
virDirRead
(
sysdir
,
&
dirent
,
sysfs_path
))
>
0
)
{
if
(
STR
EQLEN
(
dirent
->
d_name
,
"target"
,
strlen
(
"target"
)
))
{
if
(
STR
PREFIX
(
dirent
->
d_name
,
"target"
))
{
if
(
sscanf
(
dirent
->
d_name
,
"target%u:"
,
host
)
!=
1
)
{
VIR_DEBUG
(
"Failed to parse target '%s'"
,
dirent
->
d_name
);
...
...
src/storage/storage_backend_scsi.c
浏览文件 @
0f79480b
...
...
@@ -350,7 +350,7 @@ getBlockDevice(uint32_t host,
goto
cleanup
;
while
((
direrr
=
virDirRead
(
lun_dir
,
&
lun_dirent
,
lun_path
))
>
0
)
{
if
(
STR
EQLEN
(
lun_dirent
->
d_name
,
"block"
,
5
))
{
if
(
STR
PREFIX
(
lun_dirent
->
d_name
,
"block"
))
{
if
(
strlen
(
lun_dirent
->
d_name
)
==
5
)
{
if
(
getNewStyleBlockDevice
(
lun_path
,
lun_dirent
->
d_name
,
...
...
src/xen/xen_hypervisor.c
浏览文件 @
0f79480b
...
...
@@ -2255,7 +2255,7 @@ get_cpu_flags(virConnectPtr conn, const char **hvm, int *pae, int *longmode)
*
pae
=
0
;
*
hvm
=
""
;
if
(
STR
EQLEN
((
const
char
*
)
&
regs
.
r_ebx
,
"AuthcAMDenti"
,
12
))
{
if
(
STR
PREFIX
((
const
char
*
)
&
regs
.
r_ebx
,
"AuthcAMDenti"
))
{
if
(
pread
(
fd
,
&
regs
,
sizeof
(
regs
),
0x80000001
)
==
sizeof
(
regs
))
{
/* Read secure virtual machine bit (bit 2 of ECX feature ID) */
if
((
regs
.
r_ecx
>>
2
)
&
1
)
...
...
@@ -2263,7 +2263,7 @@ get_cpu_flags(virConnectPtr conn, const char **hvm, int *pae, int *longmode)
if
((
regs
.
r_edx
>>
6
)
&
1
)
*
pae
=
1
;
}
}
else
if
(
STR
EQLEN
((
const
char
*
)
&
regs
.
r_ebx
,
"GenuntelineI"
,
12
))
{
}
else
if
(
STR
PREFIX
((
const
char
*
)
&
regs
.
r_ebx
,
"GenuntelineI"
))
{
if
(
pread
(
fd
,
&
regs
,
sizeof
(
regs
),
0x00000001
)
==
sizeof
(
regs
))
{
/* Read VMXE feature bit (bit 5 of ECX feature ID) */
if
((
regs
.
r_ecx
>>
5
)
&
1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录