]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
move lxc_conf_init to conf.c
authorDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)
Changed the struct lxc_conf initialization function to the
right place.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c
src/lxc/confile.h
src/lxc/lxc_create.c
src/lxc/lxc_execute.c

index 96e4ed8139b19bc20d40738c15a5be818a4c34bb..6c3476af090ccece78348d7d574f68f89098772f 100644 (file)
@@ -1300,6 +1300,18 @@ out:
        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)
index 204a2840a8a0cabc470a447be5d0906d3084d5b7..1f555880ad214c859de26e3785f29298b4327af4 100644 (file)
@@ -150,6 +150,11 @@ struct lxc_tty_info {
        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
  */
index 4a2fc5cf2c87ac81187c9065b7ec5b579e84866b..725a9593344881c312cc0a7cf071621d39621494 100644 (file)
@@ -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,
                                      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;
-}
index f81217be0c3a08a64be1ca0d4b7f087d2d581b84..d0e7653e8d015c8adfa9f1489cfcc4fef08cf1cd 100644 (file)
@@ -21,7 +21,6 @@
  * 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);
 
 
index 12e14f9e2245605943a12383a6ccd157d663f3ce..00dbb83fc0bdff6d3202746795dc12b7edb9a6e3 100644 (file)
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
        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;
        }
index bdf65aa13fdd22955f538d213c50a8c342ae21cb..7cda46806260e4433a03d239e4ec96af1fff3b87 100644 (file)
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
 
        argc -= nbargs;
        
-       if (lxc_config_init(&lxc_conf)) {
+       if (lxc_conf_init(&lxc_conf)) {
                fprintf(stderr, "failed to initialize the configuration\n");
                goto out;
        }