diff --git a/src/lxc/confile.c b/src/lxc/confile.c index ba5cbc7e4..9929ee082 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -407,7 +407,7 @@ static int config_network_nic(const char *key, const char *value, ERROR("unknown key %s", key); goto out; } - ret = config->cb(key, value, lxc_conf); + ret = config->set(key, value, lxc_conf); out: free(copy); @@ -2418,7 +2418,7 @@ static int parse_line(char *buffer, void *data) goto out; } - ret = config->cb(key, value, plc->conf); + ret = config->set(key, value, plc->conf); out: free(linep); diff --git a/src/lxc/confile.h b/src/lxc/confile.h index 12ffd3c50..36e4bcb08 100644 --- a/src/lxc/confile.h +++ b/src/lxc/confile.h @@ -34,7 +34,9 @@ struct lxc_list; typedef int (*config_cb)(const char *, const char *, struct lxc_conf *); struct lxc_config_t { char *name; - config_cb cb; + config_cb set; + config_cb get; + config_cb clear; }; extern struct lxc_config_t *lxc_getconfig(const char *key); diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ebbcfe86c..d2a366e18 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2461,7 +2461,7 @@ static bool set_config_item_locked(struct lxc_container *c, const char *key, con config = lxc_getconfig(key); if (!config) return false; - if (config->cb(key, v, c->lxc_conf) != 0) + if (config->set(key, v, c->lxc_conf) != 0) return false; return do_append_unexp_config_line(c->lxc_conf, key, v); }