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

Function conf_save

scripts/config/nconf.c:1527–1557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1525}
1526
1527static void conf_save(void)
1528{
1529 while (1) {
1530 int res;
1531 res = dialog_inputbox(main_window,
1532 NULL, save_config_text,
1533 filename,
1534 &dialog_input_result,
1535 &dialog_input_result_len);
1536 switch (res) {
1537 case 0:
1538 if (!dialog_input_result[0])
1539 return;
1540 res = conf_write(dialog_input_result);
1541 if (!res) {
1542 set_config_filename(dialog_input_result);
1543 return;
1544 }
1545 btn_dialog(main_window, "Can't create file!",
1546 1, "<OK>");
1547 break;
1548 case 1:
1549 show_scroll_win(main_window,
1550 "Save Alternate Configuration",
1551 save_config_help);
1552 break;
1553 case KEY_EXIT:
1554 return;
1555 }
1556 }
1557}
1558
1559static void setup_windows(void)
1560{

Callers 1

handle_f6Function · 0.70

Calls 5

conf_writeFunction · 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