Merge branch 'bugfix/conf_across_mountpoints' into 'master'

Create temp config in the same dir as target

Fixes case where SDK and app are on different mounts

(In our usage of kconfig, dirname is the empty string & basename is the full path to sdkconfig)

Github pull request https://github.com/espressif/esp-idf/pull/151


See merge request !309
This commit is contained in:
Angus Gratton 2016-12-15 07:07:27 +08:00
commit f1390fa7c9

View file

@ -771,7 +771,7 @@ int conf_write(const char *name)
sprintf(newname, "%s%s", dirname, basename); sprintf(newname, "%s%s", dirname, basename);
env = getenv("KCONFIG_OVERWRITECONFIG"); env = getenv("KCONFIG_OVERWRITECONFIG");
if (!env || !*env) { if (!env || !*env) {
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); sprintf(tmpname, "%s.tmpconfig.%d", newname, (int)getpid());
out = fopen(tmpname, "w"); out = fopen(tmpname, "w");
} else { } else {
*tmpname = 0; *tmpname = 0;