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
821a76f1
Unverified
Commit
821a76f1
authored
May 31, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: add prototype for getter
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d37f7cd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
75 deletions
+78
-75
confile.c
src/lxc/confile.c
+71
-71
confile.h
src/lxc/confile.h
+7
-4
No files found.
src/lxc/confile.c
View file @
821a76f1
...
@@ -127,78 +127,78 @@ static int config_limit(const char *, const char *, struct lxc_conf *);
...
@@ -127,78 +127,78 @@ static int config_limit(const char *, const char *, struct lxc_conf *);
static
struct
lxc_config_t
config
[]
=
{
static
struct
lxc_config_t
config
[]
=
{
{
"lxc.arch"
,
config_personality
},
{
"lxc.arch"
,
config_personality
,
NULL
,
NULL
},
{
"lxc.pts"
,
config_pts
},
{
"lxc.pts"
,
config_pts
,
NULL
,
NULL
},
{
"lxc.tty"
,
config_tty
},
{
"lxc.tty"
,
config_tty
,
NULL
,
NULL
},
{
"lxc.devttydir"
,
config_ttydir
},
{
"lxc.devttydir"
,
config_ttydir
,
NULL
,
NULL
},
{
"lxc.kmsg"
,
config_kmsg
},
{
"lxc.kmsg"
,
config_kmsg
,
NULL
,
NULL
},
{
"lxc.aa_profile"
,
config_lsm_aa_profile
},
{
"lxc.aa_profile"
,
config_lsm_aa_profile
,
NULL
,
NULL
},
{
"lxc.aa_allow_incomplete"
,
config_lsm_aa_incomplete
},
{
"lxc.aa_allow_incomplete"
,
config_lsm_aa_incomplete
,
NULL
,
NULL
},
{
"lxc.se_context"
,
config_lsm_se_context
},
{
"lxc.se_context"
,
config_lsm_se_context
,
NULL
,
NULL
},
{
"lxc.cgroup"
,
config_cgroup
},
{
"lxc.cgroup"
,
config_cgroup
,
NULL
,
NULL
},
{
"lxc.id_map"
,
config_idmap
},
{
"lxc.id_map"
,
config_idmap
,
NULL
,
NULL
},
{
"lxc.loglevel"
,
config_loglevel
},
{
"lxc.loglevel"
,
config_loglevel
,
NULL
,
NULL
},
{
"lxc.logfile"
,
config_logfile
},
{
"lxc.logfile"
,
config_logfile
,
NULL
,
NULL
},
{
"lxc.mount.entry"
,
config_mount
},
{
"lxc.mount.entry"
,
config_mount
,
NULL
,
NULL
},
{
"lxc.mount.auto"
,
config_mount_auto
},
{
"lxc.mount.auto"
,
config_mount_auto
,
NULL
,
NULL
},
{
"lxc.mount"
,
config_fstab
},
{
"lxc.mount"
,
config_fstab
,
NULL
,
NULL
},
{
"lxc.rootfs.mount"
,
config_rootfs_mount
},
{
"lxc.rootfs.mount"
,
config_rootfs_mount
,
NULL
,
NULL
},
{
"lxc.rootfs.options"
,
config_rootfs_options
},
{
"lxc.rootfs.options"
,
config_rootfs_options
,
NULL
,
NULL
},
{
"lxc.rootfs.backend"
,
config_rootfs_backend
},
{
"lxc.rootfs.backend"
,
config_rootfs_backend
,
NULL
,
NULL
},
{
"lxc.rootfs"
,
config_rootfs
},
{
"lxc.rootfs"
,
config_rootfs
,
NULL
,
NULL
},
{
"lxc.pivotdir"
,
config_pivotdir
},
{
"lxc.pivotdir"
,
config_pivotdir
,
NULL
,
NULL
},
{
"lxc.utsname"
,
config_utsname
},
{
"lxc.utsname"
,
config_utsname
,
NULL
,
NULL
},
{
"lxc.hook.pre-start"
,
config_hook
},
{
"lxc.hook.pre-start"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.pre-mount"
,
config_hook
},
{
"lxc.hook.pre-mount"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.mount"
,
config_hook
},
{
"lxc.hook.mount"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.autodev"
,
config_hook
},
{
"lxc.hook.autodev"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.start"
,
config_hook
},
{
"lxc.hook.start"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.stop"
,
config_hook
},
{
"lxc.hook.stop"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.post-stop"
,
config_hook
},
{
"lxc.hook.post-stop"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.clone"
,
config_hook
},
{
"lxc.hook.clone"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook.destroy"
,
config_hook
},
{
"lxc.hook.destroy"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.hook"
,
config_hook
},
{
"lxc.hook"
,
config_hook
,
NULL
,
NULL
},
{
"lxc.network.type"
,
config_network_type
},
{
"lxc.network.type"
,
config_network_type
,
NULL
,
NULL
},
{
"lxc.network.flags"
,
config_network_flags
},
{
"lxc.network.flags"
,
config_network_flags
,
NULL
,
NULL
},
{
"lxc.network.link"
,
config_network_link
},
{
"lxc.network.link"
,
config_network_link
,
NULL
,
NULL
},
{
"lxc.network.name"
,
config_network_name
},
{
"lxc.network.name"
,
config_network_name
,
NULL
,
NULL
},
{
"lxc.network.macvlan.mode"
,
config_network_macvlan_mode
},
{
"lxc.network.macvlan.mode"
,
config_network_macvlan_mode
,
NULL
,
NULL
},
{
"lxc.network.veth.pair"
,
config_network_veth_pair
},
{
"lxc.network.veth.pair"
,
config_network_veth_pair
,
NULL
,
NULL
},
{
"lxc.network.script.up"
,
config_network_script_up
},
{
"lxc.network.script.up"
,
config_network_script_up
,
NULL
,
NULL
},
{
"lxc.network.script.down"
,
config_network_script_down
},
{
"lxc.network.script.down"
,
config_network_script_down
,
NULL
,
NULL
},
{
"lxc.network.hwaddr"
,
config_network_hwaddr
},
{
"lxc.network.hwaddr"
,
config_network_hwaddr
,
NULL
,
NULL
},
{
"lxc.network.mtu"
,
config_network_mtu
},
{
"lxc.network.mtu"
,
config_network_mtu
,
NULL
,
NULL
},
{
"lxc.network.vlan.id"
,
config_network_vlan_id
},
{
"lxc.network.vlan.id"
,
config_network_vlan_id
,
NULL
,
NULL
},
{
"lxc.network.ipv4.gateway"
,
config_network_ipv4_gateway
},
{
"lxc.network.ipv4.gateway"
,
config_network_ipv4_gateway
,
NULL
,
NULL
},
{
"lxc.network.ipv4"
,
config_network_ipv4
},
{
"lxc.network.ipv4"
,
config_network_ipv4
,
NULL
,
NULL
},
{
"lxc.network.ipv6.gateway"
,
config_network_ipv6_gateway
},
{
"lxc.network.ipv6.gateway"
,
config_network_ipv6_gateway
,
NULL
,
NULL
},
{
"lxc.network.ipv6"
,
config_network_ipv6
},
{
"lxc.network.ipv6"
,
config_network_ipv6
,
NULL
,
NULL
},
/* config_network_nic must come after all other 'lxc.network.*' entries */
/* config_network_nic must come after all other 'lxc.network.*' entries */
{
"lxc.network."
,
config_network_nic
},
{
"lxc.network."
,
config_network_nic
,
NULL
,
NULL
},
{
"lxc.network"
,
config_network
},
{
"lxc.network"
,
config_network
,
NULL
,
NULL
},
{
"lxc.cap.drop"
,
config_cap_drop
},
{
"lxc.cap.drop"
,
config_cap_drop
,
NULL
,
NULL
},
{
"lxc.cap.keep"
,
config_cap_keep
},
{
"lxc.cap.keep"
,
config_cap_keep
,
NULL
,
NULL
},
{
"lxc.console.logfile"
,
config_console_logfile
},
{
"lxc.console.logfile"
,
config_console_logfile
,
NULL
,
NULL
},
{
"lxc.console"
,
config_console
},
{
"lxc.console"
,
config_console
,
NULL
,
NULL
},
{
"lxc.seccomp"
,
config_seccomp
},
{
"lxc.seccomp"
,
config_seccomp
,
NULL
,
NULL
},
{
"lxc.include"
,
config_includefile
},
{
"lxc.include"
,
config_includefile
,
NULL
,
NULL
},
{
"lxc.autodev"
,
config_autodev
},
{
"lxc.autodev"
,
config_autodev
,
NULL
,
NULL
},
{
"lxc.haltsignal"
,
config_haltsignal
},
{
"lxc.haltsignal"
,
config_haltsignal
,
NULL
,
NULL
},
{
"lxc.rebootsignal"
,
config_rebootsignal
},
{
"lxc.rebootsignal"
,
config_rebootsignal
,
NULL
,
NULL
},
{
"lxc.stopsignal"
,
config_stopsignal
},
{
"lxc.stopsignal"
,
config_stopsignal
,
NULL
,
NULL
},
{
"lxc.start.auto"
,
config_start
},
{
"lxc.start.auto"
,
config_start
,
NULL
,
NULL
},
{
"lxc.start.delay"
,
config_start
},
{
"lxc.start.delay"
,
config_start
,
NULL
,
NULL
},
{
"lxc.start.order"
,
config_start
},
{
"lxc.start.order"
,
config_start
,
NULL
,
NULL
},
{
"lxc.monitor.unshare"
,
config_monitor
},
{
"lxc.monitor.unshare"
,
config_monitor
,
NULL
,
NULL
},
{
"lxc.group"
,
config_group
},
{
"lxc.group"
,
config_group
,
NULL
,
NULL
},
{
"lxc.environment"
,
config_environment
},
{
"lxc.environment"
,
config_environment
,
NULL
,
NULL
},
{
"lxc.init_cmd"
,
config_init_cmd
},
{
"lxc.init_cmd"
,
config_init_cmd
,
NULL
,
NULL
},
{
"lxc.init_uid"
,
config_init_uid
},
{
"lxc.init_uid"
,
config_init_uid
,
NULL
,
NULL
},
{
"lxc.init_gid"
,
config_init_gid
},
{
"lxc.init_gid"
,
config_init_gid
,
NULL
,
NULL
},
{
"lxc.ephemeral"
,
config_ephemeral
},
{
"lxc.ephemeral"
,
config_ephemeral
,
NULL
,
NULL
},
{
"lxc.syslog"
,
config_syslog
},
{
"lxc.syslog"
,
config_syslog
,
NULL
,
NULL
},
{
"lxc.no_new_privs"
,
config_no_new_privs
},
{
"lxc.no_new_privs"
,
config_no_new_privs
,
NULL
,
NULL
},
{
"lxc.limit"
,
config_limit
},
{
"lxc.limit"
,
config_limit
,
NULL
,
NULL
},
};
};
struct
signame
{
struct
signame
{
...
...
src/lxc/confile.h
View file @
821a76f1
...
@@ -30,13 +30,16 @@
...
@@ -30,13 +30,16 @@
struct
lxc_conf
;
struct
lxc_conf
;
struct
lxc_list
;
struct
lxc_list
;
struct
lxc_container
;
typedef
int
(
*
config_cb
)(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
typedef
int
(
*
config_set_cb
)(
const
char
*
,
const
char
*
,
struct
lxc_conf
*
);
typedef
int
(
*
config_get_cb
)(
struct
lxc_container
*
,
const
char
*
,
char
*
,
int
);
typedef
int
(
*
config_clear_cb
)(
void
);
struct
lxc_config_t
{
struct
lxc_config_t
{
char
*
name
;
char
*
name
;
config_cb
set
;
config_
set_
cb
set
;
config_cb
get
;
config_
get_
cb
get
;
config_cb
clear
;
config_c
lear_c
b
clear
;
};
};
extern
struct
lxc_config_t
*
lxc_getconfig
(
const
char
*
key
);
extern
struct
lxc_config_t
*
lxc_getconfig
(
const
char
*
key
);
...
...
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