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)
{
if (!conf)
struct lxc_pty_info *pty_info;
};
+/*
+ * Initialize the lxc configuration structure
+ */
+extern int lxc_conf_init(struct lxc_conf *conf);
+
/*
* Configure the external resources for the container
*/
return lxc_file_for_each_line(file, parse_line, buffer,
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;
-}
* 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);
if (!name)
usage(argv[0]);
- if (lxc_config_init(&lxc_conf)) {
+ if (lxc_conf_init(&lxc_conf)) {
fprintf(stderr, "failed to initialize the configuration\n");
return 1;
}
argc -= nbargs;
- if (lxc_config_init(&lxc_conf)) {
+ if (lxc_conf_init(&lxc_conf)) {
fprintf(stderr, "failed to initialize the configuration\n");
goto out;
}