Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
19425d11
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看板
提交
19425d11
编写于
4月 23, 2015
作者:
C
Cole Robinson
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Build nvram directory at driver startup
Similar to what was done for the channel socket in the previous commit.
上级
e31ab02f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
5 deletion
+21
-5
libvirt.spec.in
libvirt.spec.in
+0
-2
src/Makefile.am
src/Makefile.am
+0
-1
src/qemu/qemu_conf.c
src/qemu/qemu_conf.c
+6
-0
src/qemu/qemu_conf.h
src/qemu/qemu_conf.h
+1
-0
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+12
-0
src/qemu/qemu_process.c
src/qemu/qemu_process.c
+2
-2
未找到文件。
libvirt.spec.in
浏览文件 @
19425d11
...
...
@@ -1985,7 +1985,6 @@ exit 0
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0711, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/nvram/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
...
...
@@ -2089,7 +2088,6 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0711, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/nvram/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
...
...
src/Makefile.am
浏览文件 @
19425d11
...
...
@@ -2705,7 +2705,6 @@ if WITH_SANLOCK
endif
WITH_SANLOCK
if
WITH_QEMU
$(MKDIR_P)
"$(DESTDIR)$(localstatedir)/lib/libvirt/qemu"
$(MKDIR_P)
"$(DESTDIR)$(localstatedir)/lib/libvirt/qemu/nvram"
$(MKDIR_P)
"$(DESTDIR)$(localstatedir)/run/libvirt/qemu"
$(MKDIR_P)
"$(DESTDIR)$(localstatedir)/cache/libvirt/qemu"
$(MKDIR_P)
"$(DESTDIR)$(localstatedir)/log/libvirt/qemu"
...
...
src/qemu/qemu_conf.c
浏览文件 @
19425d11
...
...
@@ -208,6 +208,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
if
(
virAsprintf
(
&
cfg
->
channelTargetDir
,
"%s/channel/target"
,
cfg
->
libDir
)
<
0
)
goto
error
;
if
(
virAsprintf
(
&
cfg
->
nvramDir
,
"%s/nvram"
,
cfg
->
libDir
)
<
0
)
goto
error
;
}
else
{
char
*
rundir
;
char
*
cachedir
;
...
...
@@ -250,6 +252,9 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
if
(
virAsprintf
(
&
cfg
->
channelTargetDir
,
"%s/qemu/channel/target"
,
cfg
->
configBaseDir
)
<
0
)
goto
error
;
if
(
virAsprintf
(
&
cfg
->
nvramDir
,
"%s/qemu/nvram"
,
cfg
->
configBaseDir
)
<
0
)
goto
error
;
}
if
(
virAsprintf
(
&
cfg
->
configDir
,
"%s/qemu"
,
cfg
->
configBaseDir
)
<
0
)
...
...
@@ -349,6 +354,7 @@ static void virQEMUDriverConfigDispose(void *obj)
VIR_FREE
(
cfg
->
saveDir
);
VIR_FREE
(
cfg
->
snapshotDir
);
VIR_FREE
(
cfg
->
channelTargetDir
);
VIR_FREE
(
cfg
->
nvramDir
);
VIR_FREE
(
cfg
->
vncTLSx509certdir
);
VIR_FREE
(
cfg
->
vncListen
);
...
...
src/qemu/qemu_conf.h
浏览文件 @
19425d11
...
...
@@ -105,6 +105,7 @@ struct _virQEMUDriverConfig {
char
*
saveDir
;
char
*
snapshotDir
;
char
*
channelTargetDir
;
char
*
nvramDir
;
bool
vncAutoUnixSocket
;
bool
vncTLS
;
...
...
src/qemu/qemu_driver.c
浏览文件 @
19425d11
...
...
@@ -709,6 +709,11 @@ qemuStateInitialize(bool privileged,
virStrerror(errno, ebuf, sizeof(ebuf)));
goto error;
}
if (virFileMakePath(cfg->nvramDir) < 0) {
VIR_ERROR(_("Failed to create nvram dir '%s': %s"),
cfg->nvramDir, virStrerror(errno, ebuf, sizeof(ebuf)));
goto error;
}
qemu_driver->qemuImgBinary = virFindFileInPath("kvm-img");
if (!qemu_driver->qemuImgBinary)
...
...
@@ -825,6 +830,13 @@ qemuStateInitialize(bool privileged,
(int) cfg->group);
goto error;
}
if (chown(cfg->nvramDir, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
_("unable to set ownership of '%s' to %d:%d"),
cfg->nvramDir, (int) cfg->user,
(int) cfg->group);
goto error;
}
run_uid = cfg->user;
run_gid = cfg->group;
...
...
src/qemu/qemu_process.c
浏览文件 @
19425d11
...
...
@@ -4144,8 +4144,8 @@ qemuPrepareNVRAM(virQEMUDriverConfigPtr cfg,
/* Autogenerate nvram path if needed.*/
if
(
!
loader
->
nvram
)
{
if
(
virAsprintf
(
&
loader
->
nvram
,
"%s/
lib/libvirt/qemu/nvram/
%s_VARS.fd"
,
LOCALSTATEDIR
,
vm
->
def
->
name
)
<
0
)
"%s/%s_VARS.fd"
,
cfg
->
nvramDir
,
vm
->
def
->
name
)
<
0
)
goto
cleanup
;
generated
=
true
;
...
...
tester丶
🤺
@ssszwink
mentioned in commit
b843bea3
·
9月 10, 2020
mentioned in commit
b843bea3
mentioned in commit b843bea30ae32c389a77149035ce3d134e1119b5
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录