goto err;
}
- len = strlen(LXCDIR)+strlen(c->name)+strlen("/config")+2;
+ len = strlen(LXCPATH)+strlen(c->name)+strlen("/config")+2;
c->configfile = malloc(len);
if (!c->configfile) {
fprintf(stderr, "Error allocating config file pathname\n");
goto err;
}
- ret = snprintf(c->configfile, len, "%s/%s/config", LXCDIR, c->name);
+ ret = snprintf(c->configfile, len, "%s/%s/config", LXCPATH, c->name);
if (ret < 0 || ret >= len) {
fprintf(stderr, "Error printing out config file name\n");
goto err;
}
/*
- * default configuration file is $LXCDIR/$NAME/config
+ * default configuration file is $LXCPATH/$NAME/config
*/
return c;
int error_num;
int daemonize;
-#define LXCDIR "/var/lib/lxc"
bool (*is_defined)(struct lxc_container *c); // did /var/lib/lxc/$name/config exist
const char *(*state)(struct lxc_container *c);
bool (*is_running)(struct lxc_container *c); // true so long as defined and not stopped