MCPcopy Create free account
hub / github.com/coreboot/coreboot / conf_write_autoconf

Function conf_write_autoconf

util/kconfig/confdata.c:1228–1271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228int conf_write_autoconf(int overwrite)
1229{
1230 struct symbol *sym;
1231 const char *autoconf_name = conf_get_autoconfig_name();
1232 int ret, i;
1233
1234 if (!overwrite && is_present(autoconf_name))
1235 return 0;
1236
1237 ret = conf_write_autoconf_cmd(autoconf_name);
1238 if (ret)
1239 return -1;
1240
1241 if (conf_touch_deps())
1242 return 1;
1243
1244 for_all_symbols(i, sym)
1245 sym_calc_value(sym);
1246
1247 ret = __conf_write_autoconf(conf_get_autoheader_name(),
1248 print_symbol_for_c,
1249 &comment_style_c);
1250 if (ret)
1251 return ret;
1252
1253 ret = __conf_write_autoconf(conf_get_rustccfg_name(),
1254 print_symbol_for_rustccfg,
1255 NULL);
1256 if (ret)
1257 return ret;
1258
1259 /*
1260 * Create include/config/auto.conf. This must be the last step because
1261 * Kbuild has a dependency on auto.conf and this marks the successful
1262 * completion of the previous steps.
1263 */
1264 ret = __conf_write_autoconf(conf_get_autoconfig_name(),
1265 print_symbol_for_autoconf,
1266 &comment_style_pound);
1267 if (ret)
1268 return ret;
1269
1270 return 0;
1271}
1272
1273static bool conf_changed;
1274static void (*conf_changed_callback)(void);

Callers 6

saveConfigMethod · 0.85
saveConfigAsMethod · 0.85
do_exitFunction · 0.85
handle_exitFunction · 0.85
mainFunction · 0.85
on_save_activateFunction · 0.85

Calls 8

conf_get_autoconfig_nameFunction · 0.85
is_presentFunction · 0.85
conf_write_autoconf_cmdFunction · 0.85
conf_touch_depsFunction · 0.85
sym_calc_valueFunction · 0.85
__conf_write_autoconfFunction · 0.85
conf_get_autoheader_nameFunction · 0.85
conf_get_rustccfg_nameFunction · 0.85

Tested by

no test coverage detected