Changeset 3194 in MondoRescue for branches/3.2/mondo/src/mondorestore


Ignore:
Timestamp:
Sep 29, 2013, 7:27:11 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Fix all compilation/link error due to the previous giant merge with 3.1. 3.2 is ready to test
Location:
branches/3.2/mondo/src/mondorestore
Files:
5 edited

Legend:

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

    r3193 r3194  
    9090        newtRefresh();
    9191    }
    92     if (checksum == NULL]) {
     92    if (checksum == NULL) {
    9393        log_msg(2, "Warning - %s has no checksum", bigfile_fname);
    9494    }
     
    235235    char *tmp = NULL;
    236236    char *archiver_exe = NULL;
    237     char *tmp1 = NULL;
    238237    char *logfile = NULL;
    239238    char *compressor_exe = NULL;
     
    241240    use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
    242241    assert_string_is_neither_NULL_nor_zerolength(tarball_fname);
    243     mr_asprintf(filelist_name, MNT_CDROM "/archives/filelist.%d", current_tarball_number);
    244242
    245243    if (strstr(tarball_fname, ".bz2")) {
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-newt.c

    r3193 r3194  
    26322632    char sz_res[MAX_STR_LEN];
    26332633    char *header_text = NULL;
    2634     char *p = NULL;
    26352634
    26362635  /** int **************************************************************/
     
    27362735        memcpy((void *) disklist, (void *) bkp_disklist, sizeof(struct list_of_disks));
    27372736    }
    2738     paranoid_free(sz_res);
    27392737    mr_free(bkp_raidrec);
    27402738    mr_free(bkp_disklist);
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3193 r3194  
    639639/** add mallocs **/
    640640char value[MAX_STR_LEN];
    641 char *tmp = NULL;
    642641char *tmp1 = NULL;
    643642char *envtmp1 = NULL;
     
    936935            log_it("command = %s", command);
    937936            log_it("res of it = %s", call_program_and_get_last_line_of_output(command));
    938             mr_strcpy(iso_mnt, call_program_and_get_last_line_of_output(command));
     937            sprintf(iso_mnt, "%s", call_program_and_get_last_line_of_output(command));
    939938            mr_free(command);
    940939        } else {
    941             mr_asprintf(iso_mnt, "/tmp/isodir");
     940            sprintf(iso_mnt, "/tmp/isodir");
    942941            mr_asprintf(tmp1, "mkdir -p %s", iso_mnt);
    943942            run_program_and_log_output(tmp1, 5);
     
    979978}
    980979g_backup_media_type = bkpinfo->backup_media_type;
    981 paranoid_free(value);
    982 paranoid_free(iso_mnt);
    983 paranoid_free(iso_path);
    984980return (0);
    985981
     
    20532049            /* Doing that allow us to remain compatible with pre-2.2.5 versions */
    20542050            log_msg(2, "pre-2.2.4 compatible mode on");
    2055             mr_sprintf(command, "dd if=%s bs=%ld count=%ld 2> /dev/null | tar -zx %s %s %s %s %s", dev, bkpinfo->internal_tape_block_size, 1024L * 1024 * 32 / bkpinfo->internal_tape_block_size, MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB);
     2051            mr_asprintf(command,    "dd if=%s bs=%ld count=%ld 2> /dev/null | tar -zx %s %s %s %s %s", dev, bkpinfo->internal_tape_block_size, 1024L * 1024 * 32 / bkpinfo->internal_tape_block_size, MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB);
    20562052            log_msg(2, "command = '%s'", command);
    20572053            res = run_program_and_log_output(command, -1);
     
    21032099    unlink(FILELIST_FULL_STUB);
    21042100    unlink(BIGGIELIST_TXT_STUB);
    2105     mr _asprintf(command, "mkdir -p %s", mountpt);
     2101    mr_asprintf(command, "mkdir -p %s", mountpt);
    21062102    run_program_and_log_output(command, FALSE);
    21072103    mr_free(command);
  • branches/3.2/mondo/src/mondorestore/mondorestore.c

    r3193 r3194  
    431431  /** needs malloc **********/
    432432    char *tmp;
    433     char *p = NULL;
    434433    char *tmp1 = NULL;
    435434    char *fstab_fname = NULL;
     
    460459    log_it("Done loading config file; resizing ML");
    461460
    462     mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE);
     461    mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));
    463462    if (strstr(tmp1, "noresize")) {
    464463        log_msg(1, "Not resizing mountlist.");
     
    578577                strcpy(tmp, old_restpath);
    579578                // (NB: %s is where your filesystem is mounted now, by default)", MNT_RESTORING);
    580                 if (popup_and_get_string
    581                     ("Restore path", "Restore files to where?", tmp,
    582                      MAX_STR_LEN / 4)) {
     579                if (popup_and_get_string("Restore path", "Restore files to where?", tmp, MAX_STR_LEN / 4)) {
    583580                    if (!strcmp(tmp, "/")) {
    584581                        if (!ask_me_yes_or_no("Are you sure?")) {
     
    788785            twenty_seconds_til_yikes();
    789786            g_fprep = fopen("/tmp/prep.sh", "w");
    790             mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE,TRUE));
     787            mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));
    791788            if (strstr(tmp1, "nopart")) {
    792789                log_msg(2, "Not partitioning drives due to 'nopart' option.");
     
    860857
    861858  after_the_nuke:
    862     mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE,TRUE));
     859    mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE));
    863860    if (retval) {
    864861        log_to_screen("Errors occurred during the nuke phase.");
     
    912909    strcpy(bkpinfo->restore_path, "/");
    913910    if (!g_restoring_live_from_cd && !g_restoring_live_from_netfs) {
    914         popup_and_OK
    915             ("Please insert tape/CD/USB Key, then hit 'OK' to continue.");
     911        popup_and_OK("Please insert tape/CD/USB Key, then hit 'OK' to continue.");
    916912        sleep(1);
    917913    }
     
    940936        save_filelist(filelist, "/tmp/selected-files.txt");
    941937        mr_asprintf(old_restpath, "%s", bkpinfo->restore_path);
    942         if (popup_and_get_string("Restore path",
    943                                  "Restore files to where? )",
    944                                  bkpinfo->restore_path, MAX_STR_LEN / 4)) {
     938        if (popup_and_get_string("Restore path", "Restore files to where? ", bkpinfo->restore_path, MAX_STR_LEN / 4)) {
    945939            log_it("Restoring everything");
    946940            retval += restore_everything(filelist);
     
    958952    }
    959953    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    960         log_msg(2,
    961                 "Tape : I don't need to unmount or eject the CD-ROM.");
     954        log_msg(2, "Tape : I don't need to unmount or eject the CD-ROM.");
    962955    } else {
    963956        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
     
    987980 * @{
    988981 */
     982
    989983/**
    990984 * Restore biggiefile @p bigfileno from the currently mounted CD.
     
    998992 * @return 0 for success (or skip), nonzero for failure.
    999993 */
    1000 int
    1001 restore_a_biggiefile_from_CD(long bigfileno,
     994int restore_a_biggiefile_from_CD(long bigfileno,
    1002995                             struct s_node *filelist,
    1003996                             char *pathname_of_last_file_restored)
     
    22042197  /** malloc add ****/
    22052198    char *tmp = NULL;
     2199    char *tmp1 = NULL;
    22062200    char *biggie_fname;
    22072201    char *biggie_cksum;
  • branches/3.2/mondo/src/mondorestore/mr-externs.h

    r3193 r3194  
    99#define BIGGIELIST MNT_CDROM"/archives/biggielist.txt"
    1010#define ARCHIVES_PATH MNT_CDROM"/archives"
     11/*
    1112#define BIGGIELIST ARCHIVES_PATH"/biggielist.txt"
     13*/
    1214
    1315#ifdef __FreeBSD__
Note: See TracChangeset for help on using the changeset viewer.