From: Felix Fietkau Date: Sun, 2 Oct 2011 16:38:58 +0000 (+0200) Subject: only override the uci conf dir in dummy mode X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=216f718323126aa5b89b820363c20f49488cbba1;hp=1c669b1e235dd6662a6165fe8bc6ae069da22de4 only override the uci conf dir in dummy mode --- diff --git a/CMakeLists.txt b/CMakeLists.txt index de0c74b..8fb8ae1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ IF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") SET(SOURCES ${SOURCES} system-linux.c) SET(LIBS ${LIBS} nl) ELSE() + ADD_DEFINITIONS(-DDUMMY_MODE=1) SET(SOURCES ${SOURCES} system-dummy.c) ENDIF() diff --git a/config.c b/config.c index 81cbd28..8705c16 100644 --- a/config.c +++ b/config.c @@ -215,7 +215,9 @@ config_init_interfaces(const char *name) ctx = uci_alloc_context(); uci_ctx = ctx; +#ifdef DUMMY_MODE uci_set_confdir(ctx, "./config"); +#endif if (uci_load(ctx, "network", &p)) { fprintf(stderr, "Failed to load network config\n");