Ignore:
Timestamp:
Jun 19, 2013, 8:34:46 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • First pass on svn merge -r 2935:3146 ../3.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/mondo/src/common/newt-specific.c

    r2937 r3147  
    5757 */
    5858    bool g_exiting = FALSE;
     59
     60// Decide whether we should continue to ask questions or exit (cron use case)
     61extern bool g_fail_immediately;
    5962
    6063/**
     
    122125        char *tmp;
    123126
    124          assert_string_is_neither_NULL_nor_zerolength(prompt);
    125 
     127        assert_string_is_neither_NULL_nor_zerolength(prompt);
     128
     129        if (g_fail_immediately) {
     130            // We consider the user aborted by using the -F option
     131            log_msg(3, "Exiting at first interaction request due to -F");
     132            finish(1);
     133        }
    126134        if (g_text_mode) {
    127135            while (1) {
     
    163171        /*@ buffer *********************************************************** */
    164172        char *tmp = NULL;
     173        char *p;
    165174        int i;
    166175
    167         assert_string_is_neither_NULL_nor_zerolength(prompt);
     176        if (g_fail_immediately) {
     177            // We consider the user aborted by using the -F option
     178            log_msg(3, "Exiting at first interaction request due to -F");
     179            finish(1);
     180        }
    168181
    169182        if (g_text_mode) {
     
    318331        sync();
    319332
    320         chdir("/");
     333        if (chdir("/")) {
     334            // FIXME
     335        }
    321336        if (g_selfmounted_isodir) {
    322337            mr_asprintf(command, "umount -d %s", g_selfmounted_isodir);
     
    369384
    370385        /*  Before removing dir, make sure we're out of them */
    371         chdir("/tmp");
     386        if (chdir("/tmp")) {
     387            // FIXME
     388        }
    372389        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    373390        if (g_selfmounted_isodir) {
     
    385402                log_msg(8,"erasing tempdir %s",bkpinfo->tmpdir);
    386403                mr_asprintf(command, "rm -Rf %s", bkpinfo->tmpdir);
    387                 system(command);
     404                paranoid_system(command);
    388405                mr_free(command);
    389406            }
     
    394411                log_msg(8,"erasing scratchdir %s",bkpinfo->scratchdir);
    395412                mr_asprintf(command, "rm -Rf %s", bkpinfo->scratchdir);
    396                 system(command);
     413                paranoid_system(command);
    397414                mr_free(command);
    398415            }
     
    424441        char *command = NULL;
    425442        char *tmp = NULL;
     443        char *p = NULL;
    426444
    427445        /*@ pointers ********************************************************* */
     
    763781        /*@ buffers *********************************************************** */
    764782        char *prompt = NULL;
     783        char *q;
    765784
    766785        /*@ newt ************************************************************** */
     
    11301149        static char *possible_responses[] = { "none", "cdr", "cdrw", "dvd", "tape", "cdstream", "udev", "netfs", "iso", NULL };
    11311150        char *outstr = NULL;
     1151        char *p;
    11321152        t_bkptype backup_type;
    11331153        int i;
     
    12861306        newtPushHelpLine("   Please specify the level of compression that you want.");
    12871307        newtCenteredWindow(34, 13, "How much compression?");
    1288         b1 = newtButton(4, 1, "Maximum");
    1289         b2 = newtButton(18, 1, "Average");
    1290         b3 = newtButton(4, 5, "Minimum");
    1291         b4 = newtButton(18, 5, " None ");
     1308        b1 = newtButton(4, 1, "Maximum (9)");
     1309        b2 = newtButton(18, 1, "Average (4)");
     1310        b3 = newtButton(4, 5, "Minimum (1)");
     1311        b4 = newtButton(18, 5, " None (0) ");
    12921312        b5 = newtButton(4, 9, "         Exit        ");
    12931313        myForm = newtForm(NULL, NULL, 0);
     
    13271347        bool done;
    13281348        char *tmp = NULL;
     1349        char *p;
    13291350        char *tmp1 = NULL;
    13301351        FILE *fin, *fout;
     
    15631584}                               /* extern "C" */
    15641585#endif
    1565 
    1566 
    1567 void wait_until_software_raids_are_prepped(char *mdstat_file, int wait_for_percentage);
Note: See TracChangeset for help on using the changeset viewer.