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
089cd8b8
Commit
089cd8b8
authored
Mar 30, 2009
by
Daniel Lezcano
Committed by
Daniel Lezcano
Mar 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move lxc_conf_init to conf.c
Changed the struct lxc_conf initialization function to the right place. Signed-off-by:
Daniel Lezcano
<
daniel.lezcano@free.fr
>
parent
a871ff6b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
15 deletions
+19
-15
conf.c
src/lxc/conf.c
+12
-0
conf.h
src/lxc/conf.h
+5
-0
confile.c
src/lxc/confile.c
+0
-12
confile.h
src/lxc/confile.h
+0
-1
lxc_create.c
src/lxc/lxc_create.c
+1
-1
lxc_execute.c
src/lxc/lxc_execute.c
+1
-1
No files found.
src/lxc/conf.c
View file @
089cd8b8
...
@@ -1300,6 +1300,18 @@ out:
...
@@ -1300,6 +1300,18 @@ out:
return
ret
;
return
ret
;
}
}
int
lxc_conf_init
(
struct
lxc_conf
*
conf
)
{
conf
->
rootfs
=
NULL
;
conf
->
fstab
=
NULL
;
conf
->
utsname
=
NULL
;
conf
->
tty
=
0
;
conf
->
pts
=
0
;
lxc_list_init
(
&
conf
->
cgroup
);
lxc_list_init
(
&
conf
->
networks
);
return
0
;
}
int
lxc_configure
(
const
char
*
name
,
struct
lxc_conf
*
conf
)
int
lxc_configure
(
const
char
*
name
,
struct
lxc_conf
*
conf
)
{
{
if
(
!
conf
)
if
(
!
conf
)
...
...
src/lxc/conf.h
View file @
089cd8b8
...
@@ -151,6 +151,11 @@ struct lxc_tty_info {
...
@@ -151,6 +151,11 @@ struct lxc_tty_info {
};
};
/*
/*
* Initialize the lxc configuration structure
*/
extern
int
lxc_conf_init
(
struct
lxc_conf
*
conf
);
/*
* Configure the external resources for the container
* Configure the external resources for the container
*/
*/
extern
int
lxc_configure
(
const
char
*
name
,
struct
lxc_conf
*
conf
);
extern
int
lxc_configure
(
const
char
*
name
,
struct
lxc_conf
*
conf
);
...
...
src/lxc/confile.c
View file @
089cd8b8
...
@@ -564,15 +564,3 @@ int lxc_config_read(const char *file, struct lxc_conf *conf)
...
@@ -564,15 +564,3 @@ int lxc_config_read(const char *file, struct lxc_conf *conf)
return
lxc_file_for_each_line
(
file
,
parse_line
,
buffer
,
return
lxc_file_for_each_line
(
file
,
parse_line
,
buffer
,
sizeof
(
buffer
),
conf
);
sizeof
(
buffer
),
conf
);
}
}
int
lxc_config_init
(
struct
lxc_conf
*
conf
)
{
conf
->
rootfs
=
NULL
;
conf
->
fstab
=
NULL
;
conf
->
utsname
=
NULL
;
conf
->
tty
=
0
;
conf
->
pts
=
0
;
lxc_list_init
(
&
conf
->
cgroup
);
lxc_list_init
(
&
conf
->
networks
);
return
0
;
}
src/lxc/confile.h
View file @
089cd8b8
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
extern
int
lxc_config_init
(
struct
lxc_conf
*
conf
);
extern
int
lxc_config_read
(
const
char
*
file
,
struct
lxc_conf
*
conf
);
extern
int
lxc_config_read
(
const
char
*
file
,
struct
lxc_conf
*
conf
);
...
...
src/lxc/lxc_create.c
View file @
089cd8b8
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
if
(
!
name
)
if
(
!
name
)
usage
(
argv
[
0
]);
usage
(
argv
[
0
]);
if
(
lxc_conf
ig
_init
(
&
lxc_conf
))
{
if
(
lxc_conf_init
(
&
lxc_conf
))
{
fprintf
(
stderr
,
"failed to initialize the configuration
\n
"
);
fprintf
(
stderr
,
"failed to initialize the configuration
\n
"
);
return
1
;
return
1
;
}
}
...
...
src/lxc/lxc_execute.c
View file @
089cd8b8
...
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
...
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
argc
-=
nbargs
;
argc
-=
nbargs
;
if
(
lxc_conf
ig
_init
(
&
lxc_conf
))
{
if
(
lxc_conf_init
(
&
lxc_conf
))
{
fprintf
(
stderr
,
"failed to initialize the configuration
\n
"
);
fprintf
(
stderr
,
"failed to initialize the configuration
\n
"
);
goto
out
;
goto
out
;
}
}
...
...
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