Ignore:
Timestamp:
Apr 22, 2014, 11:06:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix a bug due to lack of memory allocation for a tmp var to display
  • Fix another bug in the call to labeling which used a bad variable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3211 r3263  
    185185{
    186186while (get_cfg_file_from_archive()) {
    187 if (!ask_me_yes_or_no
    188     ("Failed to find config file/archives. Choose another source?"))
    189 {
    190     fatal_error("Could not find config file/archives. Aborting.");
    191 }
    192 interactively_obtain_media_parameters_from_user(FALSE);
    193 }
     187    if (!ask_me_yes_or_no("Failed to find config file/archives. Choose another source?")) {
     188        fatal_error("Could not find config file/archives. Aborting.");
     189    }
     190    interactively_obtain_media_parameters_from_user(FALSE);
     191    }
    194192}
    195193
     
    21182116            log_msg(2, "gcffa --- calling mount_media now :)");
    21192117            if (!mount_media()) {
    2120                 log_msg(2,
    2121                         "gcffa --- managed to mount CD; so, no need for Plan B");
     2118                log_msg(2, "gcffa --- managed to mount CD; so, no need for Plan B");
    21222119                try_plan_B = FALSE;
    21232120            } else {
     
    21762173                }
    21772174
    2178                 log_msg(2,
    2179                         "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz");
     2175                log_msg(2, "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz");
    21802176                mr_asprintf(command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz ./%s ./%s ./%s ./%s ./%s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB);    // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
    21812177                run_program_and_log_output(command, TRUE);
     
    22002196        mr_asprintf(command, "cp -f %s %s", tmp, cfg_file);
    22012197        log_it("%s",command);
    2202         if (strcmp(tmp, cfg_file)
    2203             && run_program_and_log_output(command, 1)) {
     2198        if (strcmp(tmp, cfg_file) && run_program_and_log_output(command, 1)) {
    22042199            log_msg(1,
    22052200                    "... but an error occurred when I tried to move it to %s",
     
    22132208        log_it("%s",command);
    22142209        if (extract_mountlist_stub) {
    2215             if (strcmp(tmp, cfg_file)
    2216                 && run_program_and_log_output(command, 1)) {
     2210            if (strcmp(tmp, cfg_file) && run_program_and_log_output(command, 1)) {
    22172211                log_msg(1, "Failed to get mountlist");
    22182212            } else {
     
    22382232        log_it("%s",cfg_file);
    22392233        log_msg(1, "%s not found", cfg_file);
    2240         log_to_screen
    2241             ("Oh dear. Unable to recover configuration file from boot disk");
     2234        log_to_screen("Oh dear. Unable to recover configuration file from boot disk");
    22422235        return (1);
    22432236    }
     
    22462239    if (!does_file_exist(MOUNTLIST_FNAME_STUB)) {
    22472240        log_to_screen("...but not mountlist.txt - a pity, really...");
    2248     }
    2249     else {
     2241    } else {
    22502242            /* Is this code really useful ??? */
    22512243        if (extract_mountlist_stub) {
Note: See TracChangeset for help on using the changeset viewer.