diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-04-20 20:17:34 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-04-20 20:17:34 +0000 |
commit | 43ebd5a027a96bc548c03ca308df05a6926d5e91 (patch) | |
tree | e993c15374e53b9732e8876f4c26398bf53b7c1d /openwrt/scripts/config/kconfig_load.c | |
parent | 4870d7e8876b6aef4590571315dc5a9b7b1af6ea (diff) | |
download | mtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.zip mtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.tar.gz mtk-20170518-43ebd5a027a96bc548c03ca308df05a6926d5e91.tar.bz2 |
add kconfig from linux 2.6 to scripts/config
SVN-Revision: 3682
Diffstat (limited to 'openwrt/scripts/config/kconfig_load.c')
-rw-r--r-- | openwrt/scripts/config/kconfig_load.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/openwrt/scripts/config/kconfig_load.c b/openwrt/scripts/config/kconfig_load.c new file mode 100644 index 0000000..dbdcaad --- /dev/null +++ b/openwrt/scripts/config/kconfig_load.c @@ -0,0 +1,35 @@ +#include <dlfcn.h> +#include <stdio.h> +#include <stdlib.h> + +#include "lkc.h" + +#define P(name,type,arg) type (*name ## _p) arg +#include "lkc_proto.h" +#undef P + +void kconfig_load(void) +{ + void *handle; + char *error; + + handle = dlopen("./libkconfig.so", RTLD_LAZY); + if (!handle) { + handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY); + if (!handle) { + fprintf(stderr, "%s\n", dlerror()); + exit(1); + } + } + +#define P(name,type,arg) \ +{ \ + name ## _p = dlsym(handle, #name); \ + if ((error = dlerror())) { \ + fprintf(stderr, "%s\n", error); \ + exit(1); \ + } \ +} +#include "lkc_proto.h" +#undef P +} |