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
23b7ea69
Commit
23b7ea69
authored
May 12, 2010
by
Daniel Lezcano
Committed by
Daniel Lezcano
May 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add lxc.rootfs.mount config option
Define lxc.rootfs.mount option in order to override the default mount point for rootfs. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
33fcb7a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
conf.h
src/lxc/conf.h
+1
-0
confile.c
src/lxc/confile.c
+18
-0
No files found.
src/lxc/conf.h
View file @
23b7ea69
...
@@ -170,6 +170,7 @@ struct lxc_console {
...
@@ -170,6 +170,7 @@ struct lxc_console {
*/
*/
struct
lxc_rootfs
{
struct
lxc_rootfs
{
char
*
path
;
char
*
path
;
char
*
mount
;
char
*
pivot
;
char
*
pivot
;
};
};
...
...
src/lxc/confile.c
View file @
23b7ea69
...
@@ -48,6 +48,7 @@ static int config_tty(const char *, char *, struct lxc_conf *);
...
@@ -48,6 +48,7 @@ static int config_tty(const char *, char *, struct lxc_conf *);
static
int
config_cgroup
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_cgroup
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_mount
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_mount
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_rootfs
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_rootfs
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_rootfs_mount
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_pivotdir
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_pivotdir
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_utsname
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_utsname
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_network_type
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
static
int
config_network_type
(
const
char
*
,
char
*
,
struct
lxc_conf
*
);
...
@@ -77,6 +78,7 @@ static struct config config[] = {
...
@@ -77,6 +78,7 @@ static struct config config[] = {
{
"lxc.tty"
,
config_tty
},
{
"lxc.tty"
,
config_tty
},
{
"lxc.cgroup"
,
config_cgroup
},
{
"lxc.cgroup"
,
config_cgroup
},
{
"lxc.mount"
,
config_mount
},
{
"lxc.mount"
,
config_mount
},
{
"lxc.rootfs.mount"
,
config_rootfs_mount
},
{
"lxc.rootfs"
,
config_rootfs
},
{
"lxc.rootfs"
,
config_rootfs
},
{
"lxc.pivotdir"
,
config_pivotdir
},
{
"lxc.pivotdir"
,
config_pivotdir
},
{
"lxc.utsname"
,
config_utsname
},
{
"lxc.utsname"
,
config_utsname
},
...
@@ -652,6 +654,22 @@ static int config_rootfs(const char *key, char *value, struct lxc_conf *lxc_conf
...
@@ -652,6 +654,22 @@ static int config_rootfs(const char *key, char *value, struct lxc_conf *lxc_conf
return
0
;
return
0
;
}
}
static
int
config_rootfs_mount
(
const
char
*
key
,
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
{
if
(
strlen
(
value
)
>=
MAXPATHLEN
)
{
ERROR
(
"%s path is too long"
,
value
);
return
-
1
;
}
lxc_conf
->
rootfs
.
mount
=
strdup
(
value
);
if
(
!
lxc_conf
->
rootfs
.
mount
)
{
SYSERROR
(
"failed to duplicate string '%s'"
,
value
);
return
-
1
;
}
return
0
;
}
static
int
config_pivotdir
(
const
char
*
key
,
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
static
int
config_pivotdir
(
const
char
*
key
,
char
*
value
,
struct
lxc_conf
*
lxc_conf
)
{
{
if
(
strlen
(
value
)
>=
MAXPATHLEN
)
{
if
(
strlen
(
value
)
>=
MAXPATHLEN
)
{
...
...
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