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
b27cdf66
Commit
b27cdf66
authored
Jun 29, 2018
by
2xsec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: lxc-config: share internal API symbols
Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
d2ba12a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
Makefile.am
src/lxc/Makefile.am
+1
-1
lxc_config.c
src/lxc/tools/lxc_config.c
+9
-4
No files found.
src/lxc/Makefile.am
View file @
b27cdf66
...
@@ -268,7 +268,7 @@ if ENABLE_TOOLS
...
@@ -268,7 +268,7 @@ if ENABLE_TOOLS
lxc_attach_SOURCES
=
tools/lxc_attach.c tools/arguments.c
lxc_attach_SOURCES
=
tools/lxc_attach.c tools/arguments.c
lxc_autostart_SOURCES
=
tools/lxc_autostart.c tools/arguments.c
lxc_autostart_SOURCES
=
tools/lxc_autostart.c tools/arguments.c
lxc_cgroup_SOURCES
=
tools/lxc_cgroup.c tools/arguments.c
lxc_cgroup_SOURCES
=
tools/lxc_cgroup.c tools/arguments.c
lxc_config_SOURCES
=
tools/lxc_config.c tools/arguments.c
tools/tool_utils.c
lxc_config_SOURCES
=
tools/lxc_config.c tools/arguments.c
lxc_console_SOURCES
=
tools/lxc_console.c tools/arguments.c tools/tool_utils.c
lxc_console_SOURCES
=
tools/lxc_console.c tools/arguments.c tools/tool_utils.c
lxc_destroy_SOURCES
=
tools/lxc_destroy.c tools/arguments.c tools/tool_utils.c
lxc_destroy_SOURCES
=
tools/lxc_destroy.c tools/arguments.c tools/tool_utils.c
lxc_device_SOURCES
=
tools/lxc_device.c tools/arguments.c tools/tool_utils.c
lxc_device_SOURCES
=
tools/lxc_device.c tools/arguments.c tools/tool_utils.c
...
...
src/lxc/tools/lxc_config.c
View file @
b27cdf66
...
@@ -52,6 +52,7 @@ static void list_config_items(void)
...
@@ -52,6 +52,7 @@ static void list_config_items(void)
for
(
i
=
&
items
[
0
];
i
->
name
;
i
++
)
for
(
i
=
&
items
[
0
];
i
->
name
;
i
++
)
printf
(
"%s
\n
"
,
i
->
name
);
printf
(
"%s
\n
"
,
i
->
name
);
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
...
@@ -60,21 +61,25 @@ int main(int argc, char *argv[])
...
@@ -60,21 +61,25 @@ int main(int argc, char *argv[])
struct
lxc_config_items
*
i
;
struct
lxc_config_items
*
i
;
const
char
*
value
;
const
char
*
value
;
if
(
argc
<
2
||
strcmp
(
argv
[
1
],
"-h"
)
==
0
||
if
(
argc
<
2
||
!
strncmp
(
argv
[
1
],
"-h"
,
strlen
(
argv
[
1
]))
||
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
!
strncmp
(
argv
[
1
],
"--help"
,
strlen
(
argv
[
1
]))
)
usage
(
argv
[
0
]);
usage
(
argv
[
0
]);
if
(
strcmp
(
argv
[
1
],
"-l"
)
==
0
)
if
(
!
strncmp
(
argv
[
1
],
"-l"
,
strlen
(
argv
[
1
])))
list_config_items
();
list_config_items
();
for
(
i
=
&
items
[
0
];
i
->
name
;
i
++
)
{
for
(
i
=
&
items
[
0
];
i
->
name
;
i
++
)
{
if
(
strcmp
(
argv
[
1
],
i
->
name
)
==
0
)
{
if
(
!
strncmp
(
argv
[
1
],
i
->
name
,
strlen
(
argv
[
1
]))
)
{
value
=
lxc_get_global_config_item
(
i
->
name
);
value
=
lxc_get_global_config_item
(
i
->
name
);
if
(
value
)
if
(
value
)
printf
(
"%s
\n
"
,
value
);
printf
(
"%s
\n
"
,
value
);
else
else
printf
(
"%s is not set.
\n
"
,
argv
[
1
]);
printf
(
"%s is not set.
\n
"
,
argv
[
1
]);
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
}
}
printf
(
"Unknown configuration item: %s
\n
"
,
argv
[
1
]);
printf
(
"Unknown configuration item: %s
\n
"
,
argv
[
1
]);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
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