]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/confile.h
lxc-setuid: use POSIX shell instead of bash
[mirror_lxc.git] / src / lxc / confile.h
CommitLineData
c2cc9f0a 1/*
2 * lxc: linux Container library
3 *
4 * (C) Copyright IBM Corp. 2007, 2008
5 *
6 * Authors:
7 * Daniel Lezcano <dlezcano at fr.ibm.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
e16dad10
CS
24#ifndef _confile_h
25#define _confile_h
26
00b3c2e2 27struct lxc_conf;
62e46035 28struct lxc_list;
00b3c2e2 29
72d0e1cb
SG
30typedef int (*config_cb)(const char *, char *, struct lxc_conf *);
31struct lxc_config_t {
32 char *name;
33 config_cb cb;
34};
35
36extern struct lxc_config_t *lxc_getconfig(const char *key);
37extern int lxc_list_nicconfigs(struct lxc_conf *c, char *key, char *retv, int inlen);
38extern int lxc_listconfigs(char *retv, int inlen);
c2cc9f0a 39extern int lxc_config_read(const char *file, struct lxc_conf *conf);
af5b0155 40extern int lxc_config_readline(char *buffer, struct lxc_conf *conf);
c2cc9f0a 41
62e46035 42extern int lxc_config_define_add(struct lxc_list *defines, char* arg);
226a18d6
DL
43extern int lxc_config_define_load(struct lxc_list *defines,
44 struct lxc_conf *conf);
e16dad10 45
525f0002
CS
46/* needed for lxc-attach */
47extern signed long lxc_config_parse_arch(const char *arch);
48
72d0e1cb
SG
49extern int lxc_get_config_item(struct lxc_conf *c, char *key, char *retv, int inlen);
50extern int lxc_clear_config_item(struct lxc_conf *c, char *key);
51extern void write_config(FILE *fout, struct lxc_conf *c);
e16dad10 52#endif