mdebase/mdm/config.c

19 lines
390 B
C
Raw Normal View History

2025-11-16 11:27:50 +09:00
#include "mdm.h"
2025-11-16 12:09:04 +09:00
#include <ini.h>
char* config_picture = NULL;
2025-11-17 18:20:36 +09:00
static int dumper(void* user, const char* section, const char* name, const char* value) {
2025-11-16 18:02:03 +09:00
(void)user;
2025-11-16 12:09:04 +09:00
if(strcmp(section, "MDM Config") != 0) return 1;
if(strcmp(name, "Picture") == 0) config_picture = MDEStringDuplicate(value);
return 1;
}
2025-11-17 18:20:36 +09:00
void parse_config(void) {
2025-11-16 12:09:04 +09:00
ini_parse(CONFDIR "/mdm/mdmrc", dumper, NULL);
}