Changeset 3194 for branches/3.2


Ignore:
Timestamp:
Sep 29, 2013, 7:27:11 PM (6 years ago)
Author:
bruno
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
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-cli.c

    r3191 r3194  
    7575    int res = 0;
    7676    int retval = 0;
    77     int i = 0, j;
     77    int i = 0;
    7878
    7979    /*@ buffers *************** */
    80     char *tmp = NULL;
    8180    char flag_val[128][MAX_STR_LEN];
    8281    bool flag_set[128];
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3191 r3194  
    884884    if (!tmp[0]) {
    885885        mr_free(tmp);
    886         mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep \)\ \' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));
     886        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));
    887887    }
    888888    if (tmp[0]) {
     
    24002400
    24012401        /* Initiate bkpinfo netfs_mount path from running environment if not already done */
    2402         if (!bkpinfo->netfs_mount == NULL) {
    2403             mr_asprintf(bkpinfo->netfs_mount, call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f1 | head -n1"));
     2402        if (bkpinfo->netfs_mount == NULL) {
     2403            mr_asprintf(bkpinfo->netfs_mount, "%s", call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f1 | head -n1"));
    24042404        }
    24052405#ifdef __FreeBSD__
     
    24172417            }
    24182418            mr_free(bkpinfo->netfs_mount);
    2419             mr_asprintf(bkpinfo->netfs_mount, "%s", p;
     2419            mr_asprintf(bkpinfo->netfs_mount, "%s", p);
    24202420            if (!bkpinfo->restore_data) {
    24212421                if ((compression_type = which_compression_type()) == NULL) {
     
    24482448
    24492449            if (!bkpinfo->restore_data) {
    2450                 mr_sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);   // 4.7 salesman's GB = 4.482 real GB = 4482 MB
     2450                mr_asprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
    24512451                mr_asprintf(comment, "How much data (in Megabytes) will each media store?");
    24522452                strcpy(tmp1, sz_size);
     
    24962496            strcpy(tmp1, "");
    24972497        }
    2498         if (!popup_and_get_string("Network user", "Which user should I use if any ?",tmp1)) {
     2498        if (!popup_and_get_string("Network user", "Which user should I use if any ?",tmp1, MAX_STR_LEN)) {
    24992499            log_to_screen("User has chosen not to backup the PC");
    25002500            finish(1);
     
    25562556            finish(1);
    25572557        }
    2558         strcpy(bkpinfo->netfs_remote_dir, tmp1);
     2558        mr_asprintf(bkpinfo->netfs_remote_dir, "%s", tmp1);
    25592559
    25602560        // check whether writable - we better remove surrounding spaces for this
    2561         strip_spaces(bkpinfo->netfs_remote_dir);
     2561        mr_strip_spaces(bkpinfo->netfs_remote_dir);
    25622562
    25632563        if (!popup_and_get_string
     
    28202820
    28212821    /* Handle devices passed in bkpinfo and print result */
    2822     /*  the mr_make_devlist_from_pathlist function appends
     2822    /*  the mr_make_devlist_from_pathlist function appends */
    28232823    /*  to the *_paths variables so copy before */
    28242824    mr_make_devlist_from_pathlist(bkpinfo->exclude_paths, 'E');
  • branches/3.2/mondo/src/common/libmondo-devices.h

    r3154 r3194  
    1212long get_phys_size_of_drive(char *drive);
    1313bool is_this_a_valid_disk_format(char *format);
    14 int mount_CDROM_here(char *device, char *mountpoint);
     14int mount_CDROM_here(char *device, const char *mountpoint);
    1515int find_device_in_mountlist(struct mountlist_itself *mountlist,
    1616                             char *device);
  • branches/3.2/mondo/src/common/libmondo-filelist.c

    r3191 r3194  
    439439    char *syscall = NULL;
    440440    char *file_to_analyze = NULL;
    441     char *strtmp = NULL;
    442441    char *tmp = NULL;
    443442    int i;
     
    17911790                }
    17921791                log_msg(5, "Found '%s'", fname);
    1793                 tmp = mr_stresc(fname, "[]*?", '\\', "'");
     1792                tmp = mr_stresc(fname, "[]*?", '\\', '\'');
    17941793                mr_free(fname);
    17951794                fname = tmp;
  • branches/3.2/mondo/src/common/libmondo-files.c

    r3191 r3194  
    291291    log_it("Calling Mindi with kernel path of '%s'", kernel);
    292292    while (!kernel[0]) {
    293         if (!ask_me_yes_or_no
    294             ("Kernel not found or invalid. Choose another?")) {
     293        if (!ask_me_yes_or_no("Kernel not found or invalid. Choose another?")) {
    295294            return (1);
    296295        }
    297         if (!popup_and_get_string
    298             ("Kernel path",
    299              "What is the full path and filename of your kernel, please?",
    300              kernel, MAX_STR_LEN / 4)) {
    301             fatal_error
    302                 ("Kernel not found. Please specify with the '-k' flag.");
     296        if (!popup_and_get_string("Kernel path", "What is the full path and filename of your kernel, please?", kernel, MAX_STR_LEN / 4)) {
     297            fatal_error("Kernel not found. Please specify with the '-k' flag.");
    303298        }
    304299        log_it("User says kernel is at %s", kernel);
     
    335330            mr_free(incoming);
    336331            output[0] = '\0';
    337             return (NULL);      // forget it :)
     332            return(NULL);       // forget it :)
    338333        }
    339334        mr_asprintf(command, "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null", incoming);
    340         mr_free(incomig);
     335        mr_free(incoming);
    341336
    342337        mr_asprintf(incoming, "%s", call_program_and_get_last_line_of_output(command));
     
    352347    strcpy(output, incoming);
    353348    if (output[0] != '\0' && does_file_exist(output)) {
    354         log_msg(4, "find_home_of_exe () --- Found %s at %s", fname, incoming);
     349        log_msg(4, "find_home_of_exe --- Found %s at %s", fname, incoming);
    355350    } else {
    356351        output[0] = '\0';
    357         log_msg(4, "find_home_of_exe() --- Could not find %s", fname);
     352        log_msg(4, "find_home_of_exe --- Could not find %s", fname);
    358353    }
    359354    mr_free(incoming);
    360355    if (!output[0]) {
    361         return (NULL);
     356        return(NULL);
    362357    } else {
    363         return (output);
     358        return(output);
    364359    }
    365360}
     
    433428        if (!lastline[0]) {
    434429            mr_free(lastline);
    435             return (0);
     430            return(0);
    436431        }
    437432    } else {
     
    444439    } else {
    445440        mr_free(lastline);
    446         return (0);
     441        return(0);
    447442    }
    448443
     
    453448    i = atoi(p);
    454449    mr_free(lastline);
    455     return (i);
     450    return(i);
    456451}
    457452
     
    471466    static char output[MAX_STR_LEN];
    472467    char *command = NULL;
     468    char *p = NULL;
    473469
    474470    /*@ pointers **************************************************** */
     
    478474
    479475    if (!does_file_exist(filename)) {
    480         log_it("Tring to get last line of nonexistent file (%s)", filename);
     476        log_it("Trying to get last line of nonexistent file (%s)", filename);
    481477        output[0] = '\0';
    482478        return (output);
     
    493489        output[strlen(output) - 1] = '\0';
    494490    }
    495     return (output);
     491    return(output);
    496492}
    497493
     
    513509        log_it("filename=%s", filename);
    514510        log_OS_error("Unable to openin filename");
    515         return (-1);
     511        return(-1);
    516512    }
    517513    fseeko(fin, 0, SEEK_END);
    518514    length = ftello(fin);
    519515    paranoid_fclose(fin);
    520     return (length);
     516    return(length);
    521517}
    522518
     
    561557        log_OS_error("Unable to fopen-in filelist");
    562558        log_to_screen("Can't open filelist");
    563         return (1);
     559        return(1);
    564560    }
    565561    fout = fopen(cksumlist, "w");
     
    568564        paranoid_fclose(fin);
    569565        log_to_screen("Can't open checksum list");
    570         return (1);
     566        return(1);
    571567    }
    572568    for (mr_getline(stub_fname, fin); !feof(fin); mr_getline(stub_fname, fin)) {
    573         if (stub_fname[(i = strlen(stub_fname) - 1)] < 32) {
     569        i = strlen(stub_fname) - 1;
     570        if (stub_fname[i] < 32) {
    574571            stub_fname[i] = '\0';
    575572        }
     
    605602    paranoid_fclose(fin);
    606603    log_it("Done.");
    607     return (0);
     604    return(0);
    608605}
    609606
     
    623620    res = system(tmp);
    624621    mr_free(tmp);
    625     return (res);
     622    return(res);
    626623}
    627624
     
    659656
    660657    unlink(outfile_fname);
    661     return (0);
     658    return(0);
    662659}
    663660
     
    687684    if (!fin) {
    688685        log_OS_error("Unable to openin filelist_fname");
    689         return (0);
     686        return(0);
    690687    }
    691688    mr_getline(incoming, fin);
     
    699696    mr_free(incoming);
    700697    paranoid_fclose(fin);
    701     return (matches);
     698    return(matches);
    702699}
    703700
     
    728725    mr_free(command);
    729726
    730     return (file_len_K);
     727    return(file_len_K);
    731728}
    732729
     
    806803    paranoid_fclose(fin);
    807804    log_it("Finished calculating total size of all biggiefiles");
    808     return (scratchL);
     805    return(scratchL);
    809806}
    810807
     
    848845    mr_free(command);
    849846
    850     return (llres);
     847    return(llres);
    851848}
    852849
     
    864861    tmp = (crc >> 8) ^ c;
    865862    crc = (crc << 8) ^ crctttab[tmp & 255];
    866     return crc;
     863    return(crc);
    867864}
    868865
     
    879876    tmp = crc ^ c;
    880877    crc = (crc >> 8) ^ crc16tab[tmp & 0xff];
    881     return crc;
     878    return(crc);
    882879}
    883880
     
    905902        log_to_screen("There may be hyperlink at http://www.mondorescue.org which");
    906903        log_to_screen("will take you to the relevant (missing) package.");
    907         return (1);
     904        return(1);
    908905    } else {
    909         return (0);
     906        return(0);
    910907    }
    911908}
     
    969966        log_it("fname=%s", fname);
    970967        log_OS_error("Unable to openin fname");
    971         return (1);
     968        return(1);
    972969    }
    973970    res = fscanf(fin, "%s\n", contents);
     
    978975    paranoid_fclose(fin);
    979976    res = 0;
    980     return (res);
    981 }
    982 
    983 
    984 
     977    return(res);
     978}
    985979
    986980
     
    10841078    mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    10851079}
    1086 
    1087 
    1088 
    10891080
    10901081
     
    11151106    char *p;
    11161107
    1117     if (! bkpinfo->netfs_mount) {
     1108    if (bkpinfo->netfs_mount == NULL) {
    11181109        fatal_error("No netfs_mount found !");
    11191110    }
     
    11521143
    11531144    mr_asprintf(command, "ifconfig %s | head -1 | awk '{print $5}'", netfs_dev);
    1154     mr_asprintf(netfs_client_hwaddr, "%s" call_program_and_get_last_line_of_output(command));
     1145    mr_asprintf(netfs_client_hwaddr, "%s", call_program_and_get_last_line_of_output(command));
    11551146    mr_free(command);
    11561147
     
    12291220    mr_free(tmp);
    12301221
    1231     sprintf(tmp, "%s/NETFS-PROTO", bkpinfo->tmpdir);
     1222    mr_asprintf(tmp, "%s/NETFS-PROTO", bkpinfo->tmpdir);
    12321223    write_one_liner_data_file(tmp, bkpinfo->netfs_proto);
    12331224    mr_free(tmp);
  • branches/3.2/mondo/src/common/libmondo-fork.c

    r3191 r3194  
    4343    /*@ pointers **************************************************** */
    4444    FILE *fin = NULL;
    45     int res = 0;
    4645
    4746    /*@ initialize data ********************************************* */
  • branches/3.2/mondo/src/common/libmondo-stream.c

    r3191 r3194  
    282282
    283283    mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f2 | head -n1", cdr_exe);
    284     mr_asprintf(tmp, "%s", all_program_and_get_last_line_of_output(command));
     284    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    285285    mr_free(command);
    286286
  • branches/3.2/mondo/src/common/libmondo-string-EXT.h

    r3042 r3194  
    3131
    3232extern int compare_two_filelist_entries(void *va, void *vb);
    33 extern int severity_of_difference(char *filename, char *out_reason);
    34 
     33extern int severity_of_difference(char *filename, char **out_reason);
    3534extern char *percent_media_full_comment();
    3635
  • branches/3.2/mondo/src/common/libmondo-string.c

    r3191 r3194  
    866866 * @return The severity (1-3).
    867867 */
    868 int severity_of_difference(char *fn, char *out_reason) {
     868int severity_of_difference(char *fn, char **out_reason) {
    869869
    870870    int sev = 3;
     
    971971    }
    972972    if (out_reason) {
    973         strcpy(out_reason, reason);
     973        strcpy(*out_reason, reason);
    974974    }
    975975    mr_free(filename);
  • branches/3.2/mondo/src/common/libmondo-string.h

    r3042 r3194  
    2626
    2727int compare_two_filelist_entries(void *va, void *vb);
    28 int severity_of_difference(char *filename, char *out_reason);
     28int severity_of_difference(char *filename, char **out_reason);
    2929
    3030char *percent_media_full_comment();
  • branches/3.2/mondo/src/common/libmondo-tools.c

    r3191 r3194  
    3434extern int g_current_media_number;
    3535extern char *MONDO_LOGFILE;
    36 extern char *g_serial_string;
    3736
    3837/* Reference to global bkpinfo */
     
    6160 * The serial string (used to differentiate between backups) of the current backup.
    6261 */
    63 char *g_serial_string = NULL;
     62extern char *g_serial_string;
    6463
    6564/**
     
    359358    char *cdr_exe = NULL;
    360359    char *tmp = NULL;
    361     char *p = NULL;
    362360    char *call_before_iso_user = NULL;
    363361    char *iso_dev = NULL;
     
    633631                mr_asprintf(ip_address, "%s", inet_ntoa((struct in_addr) *((struct in_addr *) hent->h_addr)));
    634632                mr_strcat(ip_address, strchr(bkpinfo->netfs_mount, ':'));
    635                 strcpy(bkpinfo->netfs_mount, ip_address);
    636                 mr_free(ip_address);
     633                mr_free(bkpinfo->netfs_mount);
     634                bkpinfo->netfs_mount = ip_address;
    637635            }
    638636        }
     
    801799void reset_bkpinfo()
    802800{
    803     int i;
    804801    log_msg(1, "Initializing bkpinfo");
    805802
     
    824821    bkpinfo->internal_tape_block_size = DEFAULT_INTERNAL_TAPE_BLOCK_SIZE;
    825822   
    826 /*  We need tmpdir as early as possible for further function calls */
    827     bkpinfo->tmpdir = NULL;         // Really setup after
     823    /*  We need tmpdir as early as possible for further function calls */
     824    bkpinfo->tmpdir[0]= '\0';           // Really setup after
     825    bkpinfo->scratchdir[0]= '\0';           // Really setup after
    828826    setup_tmpdir(NULL);
    829827    setup_scratchdir(NULL);
     
    848846    bkpinfo->call_after_iso[0] = '\0';
    849847    bkpinfo->kernel_path[0] = '\0';
    850     bkpinfo->netfs_mount[0] = '\0';
     848    bkpinfo->netfs_mount = NULL;
    851849    bkpinfo->netfs_proto = NULL;
    852850    bkpinfo->netfs_user = NULL;
    853     bkpinfo->netfs_remote_dir[0] = '\0';
     851    bkpinfo->netfs_remote_dir = NULL;
    854852    bkpinfo->postnuke_tarball[0] = '\0';
    855853    bkpinfo->subdir = NULL;
     
    13651363 * Function pointer to the @c log_debug_msg function to use. Points to standard_log_debug_msg() by default.
    13661364 */
    1367 void (*log_debug_msg) (int, const char *, const char *, int, const char *,
    1368                        ...) = standard_log_debug_msg;
     1365void (*log_debug_msg) (int, const char *, const char *, int, const char *, ...) = standard_log_debug_msg;
    13691366
    13701367
  • branches/3.2/mondo/src/common/libmondo-verify.c

    r3191 r3194  
    412412    char *outlog = NULL;
    413413    char *tmp = NULL;
    414     char *p = NULL;
    415414
    416415    /*@ pointers ******************************************************* */
  • branches/3.2/mondo/src/common/newt-specific.c

    r3191 r3194  
    2020#include "my-stuff.h"
    2121#include "mr_mem.h"
     22#include "mr_str.h"
    2223#include "mondostructures.h"
    2324#include "newt-specific.h"
     
    15791580                    if (filelist->entries > 0) {
    15801581                        malloc_string(reason);
    1581                         severity_of_difference(filelist->el[currline].  filename, &reason);
     1582                        severity_of_difference(filelist->el[currline].filename, &reason);
    15821583                        mr_asprintf(tmp, "%s --- %s", filelist->el[currline].filename, reason);
    15831584
  • branches/3.2/mondo/src/lib/mr_str.c

    r3193 r3194  
    222222    length = strlen(in_out);
    223223
    224     /* Skip initial caracs */
     224    // Skip initial caracs
    225225    for (i = 0; index(caracs, in_out[i]) != NULL && i < (int)length ; i++);
    226226
    227     /* Shift the string to the begining if needed */
     227    // Shift the string to the begining if needed
    228228    if (i != 0) {
    229229        for (j = 0; i < (int)length ; i++, j++) {
    230230            in_out[j] = in_out[i];
    231231        }
    232         /* Erase the end of the string if needed */
     232        // Erase the end of the string if needed
    233233        j++;
    234234        in_out[j] = '\0';
    235235    }
    236236
    237     /* Skip final caracs */
     237    // Skip final caracs
    238238    for (i = (int)strlen(in_out) - 1; i >= 0  && index(caracs, in_out[i]) != NULL; i--);
    239239
    240     /* The string now ends after that char */
     240    // The string now ends after that char
    241241    i++;
    242242    in_out[i] = '\0';
  • branches/3.2/mondo/src/mondoarchive/mondoarchive.c

    r3193 r3194  
    161161    char *tmp1 = NULL;
    162162    int res = 0;
    163     int i = 0;
    164163    int retval = 0;
    165164    char *say_at_end = NULL;
     
    243242        g_text_mode = TRUE;
    244243        setup_newt_stuff();
    245         tmp1 = mr_stresc(argv[2], "[]*?", '\\');
     244        tmp1 = mr_stresc(argv[2], "[]*?", '\\', '\'');
    246245        printf("in=%s; out=%s\n", argv[2], tmp1);
    247246        mr_free(tmp1);
  • 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.