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
e82104d3
Commit
e82104d3
authored
Apr 03, 2016
by
Christian Brauner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #939 from hallyn/2016-04-02/bdev.3
rootfs.bdev_type: implement get and clear
parents
c78de02c
6a21d4ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
confile.c
src/lxc/confile.c
+6
-0
No files found.
src/lxc/confile.c
View file @
e82104d3
...
@@ -1859,6 +1859,10 @@ static int config_rootfs_options(const char *key, const char *value,
...
@@ -1859,6 +1859,10 @@ static int config_rootfs_options(const char *key, const char *value,
static
int
config_rootfs_bdev_type
(
const
char
*
key
,
const
char
*
value
,
static
int
config_rootfs_bdev_type
(
const
char
*
key
,
const
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
struct
lxc_conf
*
lxc_conf
)
{
{
if
(
strlen
(
value
)
==
0
)
{
free
(
lxc_conf
->
rootfs
.
bdev_type
);
lxc_conf
->
rootfs
.
bdev_type
=
NULL
;
}
if
(
!
is_valid_bdev_type
(
value
))
{
if
(
!
is_valid_bdev_type
(
value
))
{
ERROR
(
"Bad bdev type for %s: %s"
,
key
,
value
);
ERROR
(
"Bad bdev type for %s: %s"
,
key
,
value
);
return
-
1
;
return
-
1
;
...
@@ -2488,6 +2492,8 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
...
@@ -2488,6 +2492,8 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
v
=
c
->
console
.
path
;
v
=
c
->
console
.
path
;
else
if
(
strcmp
(
key
,
"lxc.rootfs.mount"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.rootfs.mount"
)
==
0
)
v
=
c
->
rootfs
.
mount
;
v
=
c
->
rootfs
.
mount
;
else
if
(
strcmp
(
key
,
"lxc.rootfs.bdev"
)
==
0
)
v
=
c
->
rootfs
.
bdev_type
;
else
if
(
strcmp
(
key
,
"lxc.rootfs.options"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.rootfs.options"
)
==
0
)
v
=
c
->
rootfs
.
options
;
v
=
c
->
rootfs
.
options
;
else
if
(
strcmp
(
key
,
"lxc.rootfs"
)
==
0
)
else
if
(
strcmp
(
key
,
"lxc.rootfs"
)
==
0
)
...
...
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