]> git.ipfire.org Git - network.git/blobdiff - src/networkd/config.c
networkd: Change config read functions to not create a new instance
[network.git] / src / networkd / config.c
index a11ee1cc583a84ac20bbf76c883edf687dd2a80d..0048e44dd7107f960b4c5e35cc4513a7ef3787f6 100644 (file)
@@ -124,33 +124,13 @@ int nw_config_flush(struct nw_config* config) {
        return 0;
 }
 
-static int nw_config_parse(struct nw_config* config, FILE* f) {
+int nw_config_readf(struct nw_config* config, FILE* f) {
        // XXX TODO
 
        return 0;
 }
 
-int nw_config_readf(struct nw_config** config, FILE* f) {
-       int r;
-
-       // Create a new config object
-       r = nw_config_create(config);
-       if (r)
-               return r;
-
-       // Parse the configuration
-       r = nw_config_parse(*config, f);
-       if (r)
-               goto ERROR;
-
-       return 0;
-
-ERROR:
-       nw_config_free(*config);
-       return r;
-}
-
-int nw_config_read(struct nw_config** config, const char* path) {
+int nw_config_read(struct nw_config* config, const char* path) {
        FILE* f = NULL;
        int r;