Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
80fb564b
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看板
提交
80fb564b
编写于
3月 23, 2007
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* TODO qemud/conf.c src/virsh.c src/xend_internal.c src/xs_internal.c:
replaced all sprintf instances by snprintf ones Daniel
上级
ba83eae4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
8 deletion
+12
-8
ChangeLog
ChangeLog
+5
-0
TODO
TODO
+0
-1
qemud/conf.c
qemud/conf.c
+2
-2
src/virsh.c
src/virsh.c
+1
-1
src/xend_internal.c
src/xend_internal.c
+2
-2
src/xs_internal.c
src/xs_internal.c
+2
-2
未找到文件。
ChangeLog
浏览文件 @
80fb564b
Fri Mar 23 17:14:10 CET 2007 Daniel Veillard <veillard@redhat.com>
* TODO qemud/conf.c src/virsh.c src/xend_internal.c src/xs_internal.c:
replaced all sprintf instances by snprintf ones
Fri Mar 23 09:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_internal.c: Fix detection of host PAE capabilities,
...
...
TODO
浏览文件 @
80fb564b
TODO:
- libvirt_virDomainSetMemory should check memory is > 0
- remove calls from sprintf and use snprintf
- check how to better handle renaming of domains (xm rename and cache)
- UUID lookup in hash.c
...
...
qemud/conf.c
浏览文件 @
80fb564b
...
...
@@ -1196,8 +1196,8 @@ int qemudBuildCommandLine(struct qemud_server *server,
(
vm
->
def
->
graphicsType
==
QEMUD_GRAPHICS_VNC
?
2
:
(
vm
->
def
->
graphicsType
==
QEMUD_GRAPHICS_SDL
?
0
:
1
));
/* graphics */
s
printf
(
memory
,
"%d"
,
vm
->
def
->
memory
/
1024
);
s
printf
(
vcpus
,
"%d"
,
vm
->
def
->
vcpus
);
s
nprintf
(
memory
,
sizeof
(
memory
)
,
"%d"
,
vm
->
def
->
memory
/
1024
);
s
nprintf
(
vcpus
,
sizeof
(
vcpus
)
,
"%d"
,
vm
->
def
->
vcpus
);
if
(
!
(
*
argv
=
malloc
(
sizeof
(
char
*
)
*
(
len
+
1
))))
goto
no_memory
;
...
...
src/virsh.c
浏览文件 @
80fb564b
...
...
@@ -3282,7 +3282,7 @@ vshReadlineOptionsGenerator(const char *text, int state)
continue
;
}
res
=
vshMalloc
(
NULL
,
strlen
(
name
)
+
3
);
s
printf
(
res
,
"--%s"
,
name
);
s
nprintf
(
res
,
strlen
(
name
)
+
3
,
"--%s"
,
name
);
return
res
;
}
...
...
src/xend_internal.c
浏览文件 @
80fb564b
...
...
@@ -799,7 +799,7 @@ urlencode(const char *string)
switch
(
string
[
i
])
{
case
' '
:
case
'\n'
:
s
printf
(
ptr
,
"%%%02x"
,
string
[
i
]);
s
nprintf
(
ptr
,
4
,
"%%%02x"
,
string
[
i
]);
ptr
+=
3
;
break
;
default:
...
...
@@ -2670,7 +2670,7 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
/* from bit map, build character string of mapped CPU numbers */
for
(
i
=
0
;
i
<
maplen
;
i
++
)
for
(
j
=
0
;
j
<
8
;
j
++
)
if
(
cpumap
[
i
]
&
(
1
<<
j
))
{
s
printf
(
buf
,
"%d,"
,
(
8
*
i
)
+
j
);
s
nprintf
(
buf
,
sizeof
(
buf
)
,
"%d,"
,
(
8
*
i
)
+
j
);
strcat
(
mapstr
,
buf
);
}
mapstr
[
strlen
(
mapstr
)
-
1
]
=
']'
;
...
...
src/xs_internal.c
浏览文件 @
80fb564b
...
...
@@ -818,12 +818,12 @@ xenStoreDomainGetNetworkID(virConnectPtr conn, int id, const char *mac) {
if
(
maclen
<=
0
)
return
(
NULL
);
s
printf
(
dir
,
"/local/domain/0/backend/vif/%d"
,
id
);
s
nprintf
(
dir
,
sizeof
(
dir
)
,
"/local/domain/0/backend/vif/%d"
,
id
);
list
=
xs_directory
(
conn
->
xshandle
,
0
,
dir
,
&
num
);
if
(
list
==
NULL
)
return
(
NULL
);
for
(
i
=
0
;
i
<
num
;
i
++
)
{
s
printf
(
path
,
"%s/%s/%s"
,
dir
,
list
[
i
],
"mac"
);
s
nprintf
(
path
,
sizeof
(
path
)
,
"%s/%s/%s"
,
dir
,
list
[
i
],
"mac"
);
val
=
xs_read
(
conn
->
xshandle
,
0
,
path
,
&
len
);
if
(
val
==
NULL
)
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录