owntone-server/src/config-driver.c

29 lines
544 B
C
Raw Normal View History

2006-02-05 00:22:46 +00:00
/*
* $Id$
*/
#include <stdio.h>
2006-02-08 23:02:43 +00:00
#include "conf.h"
2006-02-05 00:22:46 +00:00
int main(int argc, char *argv[]) {
2006-02-08 23:02:43 +00:00
int err;
printf("Reading %s\n",argv[1]);
2006-02-21 03:08:14 +00:00
if((err=conf_read(argv[1])) != CONF_E_SUCCESS) {
2006-02-08 23:02:43 +00:00
printf("Error reading config: %d\n",err);
conf_close();
2006-02-05 00:22:46 +00:00
} else {
2006-02-08 23:02:43 +00:00
printf("Read config!\n");
conf_set_string("general","stupid","lalala");
conf_set_int("potato","yummy",0);
if(conf_iswritable()) {
printf("writing config\n");
conf_write();
}
2006-02-05 00:22:46 +00:00
}
2006-02-21 03:08:14 +00:00
conf_close();
2006-02-05 00:22:46 +00:00
}