Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
8e3309de
Commit
8e3309de
authored
Jun 23, 2015
by
David Ward
Committed by
Stéphane Graber
Aug 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix automatic mounts without a rootfs
Signed-off-by:
David Ward
<
david.ward@ll.mit.edu
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
57be1f37
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
conf.c
src/lxc/conf.c
+3
-3
No files found.
src/lxc/conf.c
View file @
8e3309de
...
@@ -790,7 +790,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -790,7 +790,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
if
(
default_mounts
[
i
].
source
)
{
if
(
default_mounts
[
i
].
source
)
{
/* will act like strdup if %r is not present */
/* will act like strdup if %r is not present */
source
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
mount
,
default_mounts
[
i
].
source
);
source
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
path
?
conf
->
rootfs
.
mount
:
""
,
default_mounts
[
i
].
source
);
if
(
!
source
)
{
if
(
!
source
)
{
SYSERROR
(
"memory allocation error"
);
SYSERROR
(
"memory allocation error"
);
return
-
1
;
return
-
1
;
...
@@ -798,7 +798,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -798,7 +798,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
}
}
if
(
default_mounts
[
i
].
destination
)
{
if
(
default_mounts
[
i
].
destination
)
{
/* will act like strdup if %r is not present */
/* will act like strdup if %r is not present */
destination
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
mount
,
default_mounts
[
i
].
destination
);
destination
=
lxc_string_replace
(
"%r"
,
conf
->
rootfs
.
path
?
conf
->
rootfs
.
mount
:
""
,
default_mounts
[
i
].
destination
);
if
(
!
destination
)
{
if
(
!
destination
)
{
saved_errno
=
errno
;
saved_errno
=
errno
;
SYSERROR
(
"memory allocation error"
);
SYSERROR
(
"memory allocation error"
);
...
@@ -853,7 +853,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
...
@@ -853,7 +853,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
}
}
}
}
if
(
!
cgroup_mount
(
conf
->
rootfs
.
mount
,
handler
,
cg_flags
))
{
if
(
!
cgroup_mount
(
conf
->
rootfs
.
path
?
conf
->
rootfs
.
mount
:
""
,
handler
,
cg_flags
))
{
SYSERROR
(
"error mounting /sys/fs/cgroup"
);
SYSERROR
(
"error mounting /sys/fs/cgroup"
);
return
-
1
;
return
-
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment