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

Function handle_exit

util/kconfig/mconf.c:906–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906static int handle_exit(void)
907{
908 int res;
909
910 save_and_exit = 1;
911 reset_subtitle();
912 dialog_clear();
913 if (conf_get_changed())
914 res = dialog_yesno(NULL,
915 "Do you wish to save your new configuration?\n"
916 "(Press <ESC><ESC> to continue kernel configuration.)",
917 6, 60);
918 else
919 res = -1;
920
921 end_dialog(saved_x, saved_y);
922
923 switch (res) {
924 case 0:
925 if (conf_write(filename)) {
926 fprintf(stderr, "\n\n"
927 "Error while writing of the configuration.\n"
928 "Your configuration changes were NOT saved."
929 "\n\n");
930 return 1;
931 }
932 conf_write_autoconf(0);
933 /* fall through */
934 case -1:
935 if (!silent)
936 printf("\n\n"
937 "*** End of the configuration.\n"
938 "*** Execute 'make' to start the build or try 'make help'."
939 "\n\n");
940 res = 0;
941 break;
942 default:
943 if (!silent)
944 fprintf(stderr, "\n\n"
945 "Your configuration changes were NOT saved."
946 "\n\n");
947 if (res != KEY_ESC)
948 res = 0;
949 }
950
951 return res;
952}
953
954static void sig_handler(int signo)
955{

Callers 2

sig_handlerFunction · 0.85
mainFunction · 0.85

Calls 9

reset_subtitleFunction · 0.85
dialog_clearFunction · 0.85
conf_get_changedFunction · 0.85
dialog_yesnoFunction · 0.85
end_dialogFunction · 0.85
conf_writeFunction · 0.85
fprintfFunction · 0.85
conf_write_autoconfFunction · 0.85
printfFunction · 0.85

Tested by

no test coverage detected