MCPcopy Create free account
hub / github.com/Entware/Entware / conf_load

Function conf_load

scripts/config/nconf.c:1496–1525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494}
1495
1496static void conf_load(void)
1497{
1498 while (1) {
1499 int res;
1500 res = dialog_inputbox(main_window,
1501 NULL, load_config_text,
1502 filename,
1503 &dialog_input_result,
1504 &dialog_input_result_len);
1505 switch (res) {
1506 case 0:
1507 if (!dialog_input_result[0])
1508 return;
1509 if (!conf_read(dialog_input_result)) {
1510 set_config_filename(dialog_input_result);
1511 conf_set_changed(true);
1512 return;
1513 }
1514 btn_dialog(main_window, "File does not exist!", 0);
1515 break;
1516 case 1:
1517 show_scroll_win(main_window,
1518 "Load Alternate Configuration",
1519 load_config_help);
1520 break;
1521 case KEY_EXIT:
1522 return;
1523 }
1524 }
1525}
1526
1527static void conf_save(void)
1528{

Callers 1

handle_f7Function · 0.70

Calls 6

conf_readFunction · 0.85
conf_set_changedFunction · 0.85
btn_dialogFunction · 0.85
show_scroll_winFunction · 0.85
dialog_inputboxFunction · 0.70
set_config_filenameFunction · 0.70

Tested by

no test coverage detected